Open Closed

The ABP microservice project menu permission cannot be obtained #4871


User avatar
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)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    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)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    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)
  • User Avatar
    0
    guoanjin created

    Okay, could you please help me check remotely

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    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)
  • User Avatar
    0
    guoanjin created

    Okay

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    liangshiwei created
    Fullstack Developer

    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)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.