hi
Yes. This is how webapp initital
First blazor server. Then download wasm file in the background. Next time refresh page will switch to wasm
This process will take a few seconds to initialize wasm.
Thanks.
but I can provide the module configurations and other relevant settings.
You can share a project so that I can reproduce the problem. Then I will know what is wrong.
Otherwise, it will be difficult for me to troubleshoot the problem.
Thanks.
hi IbrahimSarigoz
Can you share a test project that can reproduce the problem?
liming.ma@volosoft.com
Thanks
hi
Upgrade Volo.Abp.Studio.* to >=0.9.25
You can check these packages..
Thanks.
hi
https://abp.io/support/questions/8990/unregistered-version-of-Eziriz's-NET-Reactor#answer-3a18ca49-409a-d43e-0df5-8df4b150c93d
hi
Try to override WebAssemblyCachedApplicationConfigurationClient to fix it, We will fix it in the next version as well.
https://github.com/abpframework/abp/pull/22605/
Thanks.
using Microsoft.JSInterop;
using Volo.Abp;
using Volo.Abp.AspNetCore.Components.Web.Security;
using Volo.Abp.AspNetCore.Components.WebAssembly;
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClientProxies;
using Volo.Abp.AspNetCore.Mvc.Client;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace AbpSolution9.Blazor.Client;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ICachedApplicationConfigurationClient), typeof(WebAssemblyCachedApplicationConfigurationClient))]
public class MyWebAssemblyCachedApplicationConfigurationClient: WebAssemblyCachedApplicationConfigurationClient
{
public MyWebAssemblyCachedApplicationConfigurationClient(
AbpApplicationConfigurationClientProxy applicationConfigurationClientProxy,
ApplicationConfigurationCache cache,
ICurrentTenantAccessor currentTenantAccessor,
AbpApplicationLocalizationClientProxy applicationLocalizationClientProxy,
ApplicationConfigurationChangedService applicationConfigurationChangedService, IJSRuntime jsRuntime)
: base(applicationConfigurationClientProxy, cache, currentTenantAccessor, applicationLocalizationClientProxy, applicationConfigurationChangedService, jsRuntime)
{
}
public override async Task InitializeAsync()
{
var configurationDto = await ApplicationConfigurationClientProxy.GetAsync(
new ApplicationConfigurationRequestOptions {
IncludeLocalizationResources = false
}
);
var localizationDto = await ApplicationLocalizationClientProxy.GetAsync(
new ApplicationLocalizationRequestDto {
CultureName = configurationDto.Localization.CurrentCulture.Name,
OnlyDynamics = true
}
);
configurationDto.Localization.Resources = localizationDto.Resources;
Cache.Set(configurationDto);
if (!configurationDto.CurrentUser.IsAuthenticated)
{
await JSRuntime.InvokeVoidAsync("abp.utils.removeOidcUser");
}
CurrentTenantAccessor.Current = new BasicTenantInfo(
configurationDto.CurrentTenant.Id,
configurationDto.CurrentTenant.Name
);
ApplicationConfigurationChangedService.NotifyChanged();
}
}
ok, you can add the code below to fix it temporarily.
context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.DynamicClaims.Add(JwtClaimTypes.Role);
});
hi
You can test 1 or 2.
Thanks.
DynamicClaims.context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = false;
});
- app.UseDynamicClaims();
+ app.UseMiddleware<MyAbpDynamicClaimsMiddleware>();
public class MyAbpDynamicClaimsMiddleware : AbpMiddlewareBase, ITransientDependency
{
public async override Task InvokeAsync(HttpContext context, RequestDelegate next)
{
if (context.User.Identity?.IsAuthenticated == true)
{
if (context.RequestServices.GetRequiredService<IOptions<AbpClaimsPrincipalFactoryOptions>>().Value.IsDynamicClaimsEnabled)
{
var authenticateResultFeature = context.Features.Get<IAuthenticateResultFeature>();
var authenticationType = authenticateResultFeature?.AuthenticateResult?.Ticket?.AuthenticationScheme ?? context.User.Identity.AuthenticationType;
if (authenticateResultFeature != null && !authenticationType.IsNullOrWhiteSpace())
{
var abpClaimsPrincipalFactory = context.RequestServices.GetRequiredService<IAbpClaimsPrincipalFactory>();
var user = await abpClaimsPrincipalFactory.CreateDynamicAsync(context.User);
authenticateResultFeature.AuthenticateResult = AuthenticateResult.Success(new AuthenticationTicket(
user,
authenticateResultFeature?.AuthenticateResult?.Properties,
authenticationType));
}
if (context.User.Identity?.IsAuthenticated == false)
{
var authenticationSchemeProvider = context.RequestServices.GetRequiredService<IAuthenticationSchemeProvider>();
if (!authenticationType.IsNullOrWhiteSpace())
{
var authenticationScheme = await authenticationSchemeProvider.GetSchemeAsync(authenticationType);
if (authenticationScheme != null && typeof(IAuthenticationSignOutHandler).IsAssignableFrom(authenticationScheme.HandlerType))
{
await context.SignOutAsync(authenticationScheme.Name);
}
}
}
}
}
await next(context);
}
}
hi
Can you share test project to reproduce?
liming.ma@volosoft.com
Thanks.
hi
Can you share full debug logs(include HTTP request/response and EF Core)?
liming.ma@volosoft.com
https://abp.io/support/questions/8622/How-to-enable-Debug-logs-for-troubleshoot-problems
Thanks.