0
guoanjin created
- ABP Framework version: v6.0& v.7.0
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:" The ABP microservice project menu permission cannot be obtained. Multiple switches to other languages or logouts are required to display it. The backend modification permission and Redis cache data are not updated, resulting in the page menu permission remaining the same. Only after clearing the cache or invalidating the cache can the latest menu permission be obtained
Login to the admin account as shown in the following figure:
Switching languages is shown in the following figure:
Switching languages multiple times and logging out of the permission menu will display normally, as shown in the following figure:
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
6 Answer(s)
-
0
Hi,
Can you share the full steps to reproduce? thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
I think this problem is more related to your local environment. If you want, I can check it remotely. shiwei.liang@volosoft.com
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
please email me : shiwei.liang@volosoft.com
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi,
The problem is related to ApplicationConfigrationCache: https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationConfigurationClient.cs#L42
The cache time is 5mins by default.
Starting from 7.1, you can configure the cache expiration time:
Configure<AbpAspNetCoreMvcClientCacheOptions>(options=> { options.ApplicationConfigurationDtoCacheAbsoluteExpiration = TimeSpan.FromSeconds(30); });For now, you can reset the cache after user login:
.AddCookie("Cookies", options => { options.ExpireTimeSpan = TimeSpan.FromDays(365); var originalHandler = options.Events.OnSignedIn; options.Events.OnSignedIn = async signedInContext => { await originalHandler.Invoke(signedInContext); var currentPrincipalAccessor = signedInContext.HttpContext.RequestServices.GetRequiredService<ICurrentPrincipalAccessor>(); using (currentPrincipalAccessor.Change(signedInContext.Principal)) { await signedInContext.HttpContext.RequestServices.GetRequiredService<ICurrentApplicationConfigurationCacheResetService>().ResetAsync(); } }; })Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)


