ABP Commercial 9.1.0 / Blazor Server / EF / Non tiered / Separate Host and Tenant DBs / Lepton Theme
Hi, We have had customers experience intermittent occurrences of receiving a duplicate email through our ABP app.
After investigation, we found that this is caused by our production app being scaled out to 2 application instances in an Azure Appservice.
Steps:
Please advise on the best approach to handle this scenario using the ABP Framework.
Thanks in advance!
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