ABP Commercial 9.1.0 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Our app is running under an Azure Appservice and we noticed that the IP Address that is reported in the security logs page is showing the internal IP of the Azure Appservice that the app is running in instead of the IP address of the end-user making the request. I assume this is due to the nature of Blazor Server.
Is there a way for the end-user's IP address to show instead? Possibly by an override and/or a future ABP enhancement?
Thanks in advance.
ABP Commercial 9.1.0 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi, after upgrading from ABP 7.4.2 to 9.1.0 we are experiencing the issue described in the following link: https://github.com/abpframework/abp/issues/20619
Any recommendations?
ABP Commercial 9.1.0 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
In version 7.4.2, we relied on an override to AppUrlProvider
to support subdomain base multi-tenancy. Our override was on the ReplacePlaceHoldersAsync
method which appears to no longer be available in abp 9.1.0. Please see our override in ABP 7.4.2 and advise on how to accomplish this in ABP 9.1.0.
using JetBrains.Annotations;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
using Volo.Abp.UI.Navigation.Urls;
using Microsoft.Extensions.Localization;
using Volo.Abp.Sms;
using Microsoft.Extensions.Options;
using FM.nVision.Saas;
using Volo.Abp.Features;
namespace FM.nVision.Account
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAppUrlProvider), typeof(AppUrlProvider), typeof(ITransientDependency))]
[RequiresFeature(SaasConsts.nVisionFeature, SaasConsts.TimepieceFeature)]
[RemoteService(IsEnabled = false)]
public class nVisionAppUrlProvider : AppUrlProvider
{
public const string TenantSubdomainPlaceHolder = "{{subdomain}}";
IFMTenantRepository _fmTenantRepository { get; set; }
public nVisionAppUrlProvider(
IOptions<AppUrlOptions> options,
ICurrentTenant currentTenant,
ITenantStore tenantStore,
IFMTenantRepository fmTenantRepository) : base(options, currentTenant, tenantStore)
{
_fmTenantRepository = fmTenantRepository;
}
protected override async Task<string> ReplacePlaceHoldersAsync(string url)
{
url = await base.ReplacePlaceHoldersAsync(url);
var tenantSubdomainPlaceHolder = TenantSubdomainPlaceHolder;
if (url.Contains(TenantSubdomainPlaceHolder + '.'))
{
tenantSubdomainPlaceHolder = TenantSubdomainPlaceHolder + '.';
}
if (url.Contains(tenantSubdomainPlaceHolder))
{
if (CurrentTenant.Id.HasValue)
{
var subdomain = await GetCurrentTenantSubdomainAsync();
if (!subdomain.IsNullOrWhiteSpace())
{
url = url.Replace(tenantSubdomainPlaceHolder, subdomain + ".");
}
else
{
url = url.Replace(tenantSubdomainPlaceHolder, "");
}
}
else
{
url = url.Replace(tenantSubdomainPlaceHolder, "");
}
}
return url;
}
private async Task<string> GetCurrentTenantSubdomainAsync()
{
if (CurrentTenant.Id.HasValue)
{
return await _fmTenantRepository.GetSubdomainByTenantIdAsync(CurrentTenant.Id.Value);
}
return string.Empty;
}
}
}
ABP Commercial 9.1.0 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi we are attempting to create a v7.4.2 newly templated solution so that we can compare it to version 9.1.0 and make necessary adjustments after a ABP upgrade.
The issue we are having is that we cannot seem to specify the Lepton theme in the abp new command, no matter what theme we specify, the solution gets created with the leptonxlite theme.
Our current production application uses the Lepton theme (not LeptonX or LeptonXLite). We have many custom css overrides based on the Lepton theme, so upgrading to LeptonX is not an option right now.
The command we are issuing is...
abp new ABPTemplate742 -t app -u blazor-server -d ef --theme lepton --mobile none -v 7.4.2
Please advise. Thank you in advance.
ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
We have a customer that added users with the tenant setting for 2FA setup as 'Optional'. The customer then updated the tenant setting for 2FA to be 'Forced'. There are now users without 2FA setup while 2FA is setup to be 'Forced' at the tenant level. When logged in as the admin, and the customer attempts to turn on 2FA for a user, the below exception occurs. When changing the tenant 2FA setting back to 'Optional', the user setting for 2FA can saved/toggled without an exception.
How can we work around this issue?
2025-03-07 19:16:45.732 +00:00 [WRN] (Instance: 8235) Unhandled exception rendering component: Exception of type 'Volo.Abp.BusinessException' was thrown.
Volo.Abp.BusinessException: Exception of type 'Volo.Abp.BusinessException' was thrown.
at Volo.Abp.Identity.IdentityUserAppService.SetTwoFactorEnabledAsync(Guid id, Boolean enabled)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Abp.Identity.Pro.Blazor.Pages.Identity.UserManagement.ChangeTwoFactorAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Volo.Abp.BlazoriseUI.Components.SubmitButton.OnClickedHandler()
at Volo.Abp.BlazoriseUI.Components.SubmitButton.OnClickedHandler()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Blazorise.Button.ClickHandler(MouseEventArgs eventArgs)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
2025-03-07 19:16:45.732 +00:00 [ERR] (Instance: 8235) Unhandled exception in circuit 'xwvskV5PTwMavvvHpRq1MyaxOXSC3Nzyyc_KtxNoG_c'.
Volo.Abp.BusinessException: Exception of type 'Volo.Abp.BusinessException' was thrown.
at Volo.Abp.Identity.IdentityUserAppService.SetTwoFactorEnabledAsync(Guid id, Boolean enabled)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Features.FeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Abp.Identity.Pro.Blazor.Pages.Identity.UserManagement.ChangeTwoFactorAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Volo.Abp.BlazoriseUI.Components.SubmitButton.OnClickedHandler()
at Volo.Abp.BlazoriseUI.Components.SubmitButton.OnClickedHandler()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Blazorise.Button.ClickHandler(MouseEventArgs eventArgs)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi We have a javascript implementation that will auto logout a user after a certain period of inactivity in the browser which works great.
We'd like to enhance security by providing a server level timeout. Currently if a logged in user closes the browser tab. The user is perpetually still logged in when navigating back to the app.
Is there a way to configure an ABP Blazor Server solution to auto logout/expire a session after a certain period of inactivity at the server level?
Thanks in advance.
ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi,
Our custom SettingComponentContributor
is defined as below. What we are finding is that the ConfigureAsync
method executes, but the CheckPermissionsAsync
method never executes. The group shows in the UI without the permission check. Is there something we are misunderstanding when it comes to only showing a settings group if the current user has a certain permission?
Thanks in advance.
namespace FM.nVision.Blazor.Settings
{
public class NotificationSettingComponentContributor : ISettingComponentContributor
{
public Task ConfigureAsync(SettingComponentCreationContext context)
{
context.Groups.Add(
new SettingComponentGroup(
"FM.nVision.Settings",
"Email Notifications",
typeof(NotificationSettingGroupComponent), order: 8888
)
);
return Task.CompletedTask;
}
public async Task<bool> CheckPermissionsAsync(SettingComponentCreationContext context)
{
// check the permissions here
var authService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
if (await authService.IsGrantedAsync(nVisionPermissions.Notifications.Settings))
{
return true;
}
return false;
}
}
}
ConfigureServices
Configure<SettingManagementComponentOptions>(options =>
{
options.Contributors.Add(new NotificationSettingComponentContributor());
options.Contributors.Add(new AboutSettingComponentContributor());
});
Abp Commercial 7.4.2/ Blazor Server / EF Core / Non-tiered
Hi,
We reported the following with version 5.2.0 and, 2 years later, on version 7.4.2, we are still experiencing this problem https://abp.io/support/questions/2886/Bug-with-Extended-Properties-being-controlled-in-the-UI-for-Dependent-Modules
Please advise and let us know of any possible workaround while this gets fixed.
Thanks
ABP Commercial 7.4.2 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi, We have extended identityuser to include several new properties to determine if certain application specific email notifications are turned on for the users 'my account' area.
We then successfully added a new 'Email Notifications' profile group under the 'my account' area (see last image below).
A new model NotificationsInfoModel
is declared in our GroupViewComponent
for notifications and this model is used in our default.cshtml page for notifications.
Our default.cshtml page is defined as follows...
@model FM.nVision.Blazor.Pages.Account.Components.ProfileManagementGroup.Notifications.AccountProfileNotificationsGroupViewComponent.NotificationsInfoModel
<form id="NotificationsForm">
<div class="mb-3">
<h4 class="pt-2 pb-3">@L["Time Off Requests"]</h4>
<abp-row class="pb-4">
<abp-column>
<div>Submit Confirmation</div>
<div class="text-subtle">Occurs every time you submit a time off request</div>
</abp-column>
<abp-column>
<div class="form-switch ps-2">
<abp-input asp-for="NotifyTimeOffRequestSubmit" class="mb-4" />
</div>
</abp-column>
</abp-row>
...
</div>
<abp-button type="submit" button-type="Primary" text="@L["Submit"].Value" />
</form>
Our question is how do we handle the server side action that is performed when the submit button is clicked? We looked at the abp implementation of 'Personal Info', 'Change Password', etc. but we can't determine what gets executed when the submit button gets clicked. What makes that determination? We are not that familiar with MVC as we are building a Blazor Server application.
We essentially want to call an new method to an overridden ProfileAppService that contains a new method to save email notification preferences.
Any guidance is greatly appreciated. Thank you.