Hi,
From what I could find in the documentation and in this article, bundling JavaScript or CSS files is only mentioned for Blazor WebAssembly, no mention of Blazor Server. From my tests the BundleContributor
approach does not seem to work for Blazor Server.
For now the workaround has been collocated JavaScript files with specific components.
Does ABP offer any way to do file bundling in Blazor Server? What would be the correct approach?
Hi there.
We have identified an inconsistency in the audit logs page (/audit-logs
), where the time shown in the log entries is always fixed to the value saved in the database (UTC), so any time zone setting is ignored in this page (host time zone or user account time zone setting).
This does not happen in the security logs (/Account/SecurityLogs
) where I can verify that it correctly displays the time based on the time zone setting.
Is this intended or a bug?
For added context, we are currently using the following settings related to the time zone:
Npgsql.EnableLegacyTimestampBehavior
enabled, since we are using PostgreSQL (as instructed here).AbpClockOptions.Kind
set to DateTimeKind.Utc
(as instructed here).Should both of these settings be used at the same time? I just want to ensure we are configuring time zones correctly in the application.
We are having an odd issue with the feature check where a feature can be considered both enabled and disabled depending on where it's checked.
For instance, we have a feature check on the menu contributor to only show the corresponding menu if the feature is enabled:
if (context.Menu.Name == StandardMenus.Main && await featureChecker.IsEnabledAsync(MyDefinitionProvider.MyFeature))
{
// this correctly shows or hides the menu depending on the feature status
await ConfigureMainMenuAsync(context);
}
However, when doing the same check on a background worker, sometimes we get a different result:
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
await Parallel.ForEachAsync(await TenantStore.GetListAsync(), tenantParallelOptions, async (tenant, ct) =>
{
try
{
using (CurrentTenant.Change(tenant.Id))
{
if (!await featureChecker.IsEnabledAsync(MyDefinitionProvider.MyFeature))
return;
// some logic here that should only execute when the feature is enabled
// this is where we get the inconsistency, since even with the feature enabled and menu visible, sometimes this is not executed
}
}
catch (Exception ex)
{
Logger.LogError(ex, "Error for tenant {TenantId}", tenant.Id);
}
});
}
This is a bit convoluted to reproduce, but from what we could gather it has something to do with enabling/disabling the feature for the tenant or edition, and the edition being assigned/unassigned from the tenant.
This can result in the scenario below where the row that holds the tenant status for the feature is simply deleted from the table. And THIS is when we observe the inconsistency stated above.
I know it's a little confusing, but if necessary we can schedule a call to explain in detail.
Using the module entity extension system, I'm adding a few custom properties to the Plan entity from the Payment Module. That works as expected except for one of the properties, where I need the field in the UI to allow multiple lines (text area), but instead in the UI the field is still rendered as a simple single line text input, not allowing me to input what I need.
According to the documentation:
DataTypeAttribute
is used to specify the type of the property. It is used to determine how to render the property on the user interface
So, my understanding was that by setting the data type of my property to DataType.MultilineText
as shown below, it should result in a text area field where I can type multiple lines of text, but that is not the case. Am I missing something?
Here's my custom property definition:
ObjectExtensionManager.Instance.Modules()
.ConfigurePayment(payment =>
{
payment.ConfigurePlan(plan => plan
.AddOrUpdateProperty<string>("Features", property =>
{
property.DisplayName = LocalizableString.Create<PaymentGatewayResource>("PlanFeatures");
property.Attributes.Add(new DataTypeAttribute(DataType.MultilineText));
property.UI.OnTable.IsVisible = false;
})
);
});
Hi there!
Currently, we have implemented a custom branding per tenant by overriding the properties available in the DefaultBrandingProvider
. However, this class only has AppName
, LogoUrl
and LogoReverseUrl
, which is the logo displayed on the login screen.
We need two additional overrides for the branding:
Is there a programmatic way to override these?
For the menu icon, we are able to simply replace the icon files in wwwroot, but that doesn't work for our dynamic per tenant branding we want. For the favicon, we are also able to replace the file, but for some reason while on the login page we still see the default LeptonX favicon.
Any suggestions? Thanks.
Hi! We are having an issue with Entity Framework migrations in our solution which consists of an application and multiple custom modules. Each module has its own DbContext
, like in the approach shown here. It's worth pointing out that we are using a separate database for the tenant.
To put it simply, here's the issue we are facing:
This obviously results in the error "Table_A already exists" when running the migrator. I'm not sure what we are doing wrong, but we tried a bunch of different things and the migration for Table_B is always wrong (it shouldn't try to recreate Table_A).
Any help is appreciated. Thanks!
Hi there! I'm new to ABP and I wanted to ask for advice on what would be the best approach for consuming our API back-end in a Windows Forms app. This app will run on multiple clients but all will be accessing the same API endpoint in our multi-tenant solution.
As far as I could gather, my options are:
HttpClient
with IIdentityModelAuthenticationService
for authenticationHttpClient
with IdentityModel
for OIDC discovery and authenticationWhich one do you suggest that would fit my scenario the best? Due to my multi-tenant solution, in all of the approaches above I would need to manually specify the current tenant, is that correct?
This issue seems to be the same as reported in this issue in GitHub, but I couldn't find a solution (I also asked there).
Autofac.Core.DependencyResolutionException
Message=An exception was thrown while activating AbpTest.Maui.App.
Source=Autofac
StackTrace:
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext context)
at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.<>c__DisplayClass5_0.<Execute>b__0()
at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func`1 creator)
at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, Nullable`1 qualifyingId, Func`1 creator)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
at Autofac.Core.Resolving.Middleware.ScopeSelectionMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
at Autofac.Extensions.DependencyInjection.KeyedServiceMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context)
at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext context)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest& request)
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest& request)
at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest& request)
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest& request)
at Autofac.Core.Container.ResolveComponent(ResolveRequest& request)
at Autofac.Core.Container.Autofac.IComponentContext.ResolveComponent(ResolveRequest& request)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.ResolveOptional(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.ResolveOptional(IComponentContext context, Type serviceType)
at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetService(Type serviceType)
at Microsoft.Maui.MauiContext.WrappedServiceProvider.GetService(Type serviceType) in D:\a\_work\1\s\src\Core\src\MauiContext.cs:line 72
at Microsoft.Maui.MauiContext.WrappedServiceProvider.GetService(Type serviceType) in D:\a\_work\1\s\src\Core\src\MauiContext.cs:line 72
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[IApplication](IServiceProvider provider)
at Microsoft.Maui.MauiApplication.OnCreate() in D:\a\_work\1\s\src\Core\src\Platform\Android\MauiApplication.cs:line 46
at Android.App.Application.n_OnCreate(IntPtr jnienv, IntPtr native__this) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.App.Application.cs:line 1087
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PP_V(_JniMarshal_PP_V callback, IntPtr jnienv, IntPtr klazz) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:line 26