Open Closed

Permission not granted sometimes on specified language after upgraded to ver 9.2.0 #9637


User avatar
0
trendline created

Exception message and full stack trace: Navigation menu does not appear on specified language setting

Steps to reproduce the issue:

1 login with an account, back to the web

2 the navigation menus doesn't appear

3 if access the url directly then it will jump to the account login page let you login again

4 if change the language to another one, the navigation appears, if changed the language back the navigation menu disappeared again

5 if waiting for a moments(about 10 minutes around), the navigation menu may be appears

I have tried restart the application and the server, cleared the redis server cache, it cannot resolve it. I have 3 languages configured, english, zh-hant, zh-hans, the issue occurred on zh-hans.


25 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    Based on your description, the issue is likely related to localization or caching inconsistencies for the zh-hans language, especially after upgrading to ABP 9.2.2. Here are steps to diagnose and resolve the problem:

    1. Check Localization Resource Files

      • Ensure that all required localization keys exist for zh-hans, especially for menu items and permissions. Missing keys can cause UI elements to disappear for a specific language.
    2. Verify Language Configuration

      • Confirm that zh-hans is correctly configured in your appsettings.json and that it matches the culture names used in your localization files.
    3. Clear Distributed Cache Thoroughly

      • Since you are using Redis, ensure that all language-specific cache entries are cleared. ABP caches menu and permission data per language, so stale or corrupted cache for zh-hans could cause this issue.
    4. Check for Permission Caching Issues

      • If permissions are cached per language, a cache key mismatch or corruption could cause menus to disappear. Try disabling distributed cache temporarily to see if the issue persists.
    5. Review Customizations

      • If you have custom menu providers or permission checks, ensure they handle all languages and do not filter out zh-hans unintentionally.
    6. Update All Packages

      • Make sure all ABP NuGet and NPM packages are updated to 9.2.2 to avoid version mismatches.
    7. Check for Known Issues

      • Review the ABP release notes and GitHub issues for any known problems with localization or menu rendering in 9.2.x.
    8. Debug Menu Generation

      • Add logging to your menu provider to see if the menu is being generated for zh-hans and if permissions are being granted as expected.

    If the problem only occurs for zh-hans and resolves after some time, it is almost certainly a cache or localization resource issue.

    Sources:


    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a template project to reproduce the problem?

    You can also disable Dynamic Claims in all projects and try again.

    https://abp.io/docs/latest/framework/fundamentals/dynamic-claims#enabling-disabling-the-dynamic-claims

    Thanks.

  • User Avatar
    0
    trendline created

    Local debug project has a short time delay or refresh the page can get the permissions on zh-Hans language setting, other language works fine. On production environment still occurred this problem on zh-Hans language setting after set IsDynamicClaimsEnabled as false, really odd

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can override MvcCachedApplicationConfigurationClient class in your web project and output the ApplicationConfigurationDto info to the logs.

    Then, check the output logs to see when this problem occurred.

    https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/MvcCachedApplicationConfigurationClient.cs#L39-L103

    Thanks

  • User Avatar
    0
    trendline created

    Is there a entry point to override the MvcCachedApplicationConfigurationClient class? Not found a configure point for this

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Http;
    using Microsoft.Extensions.Caching.Distributed;
    using Microsoft.Extensions.Options;
    using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations;
    using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClientProxies;
    using Volo.Abp.AspNetCore.Mvc.Client;
    using Volo.Abp.Caching;
    using Volo.Abp.DependencyInjection;
    using Volo.Abp.Threading;
    using Volo.Abp.Users;
    
    namespace MyCompanyName.MyProjectName.Web;
    
    [ExposeServices(
        typeof(ICachedApplicationConfigurationClient),
        typeof(MyMvcCachedApplicationConfigurationClient)
    )]
    public class MyMvcCachedApplicationConfigurationClient : ICachedApplicationConfigurationClient, ITransientDependency
    {
        protected IHttpContextAccessor HttpContextAccessor { get; }
        protected AbpApplicationConfigurationClientProxy ApplicationConfigurationAppService { get; }
        protected AbpApplicationLocalizationClientProxy ApplicationLocalizationClientProxy { get; }
        protected ICurrentUser CurrentUser { get; }
        protected IDistributedCache<ApplicationConfigurationDto> Cache { get; }
        protected AbpAspNetCoreMvcClientCacheOptions Options { get; }
    
        public MyMvcCachedApplicationConfigurationClient(
            IDistributedCache<ApplicationConfigurationDto> cache,
            AbpApplicationConfigurationClientProxy applicationConfigurationAppService,
            ICurrentUser currentUser,
            IHttpContextAccessor httpContextAccessor,
            AbpApplicationLocalizationClientProxy applicationLocalizationClientProxy,
            IOptions<AbpAspNetCoreMvcClientCacheOptions> options)
        {
            ApplicationConfigurationAppService = applicationConfigurationAppService;
            CurrentUser = currentUser;
            HttpContextAccessor = httpContextAccessor;
            ApplicationLocalizationClientProxy = applicationLocalizationClientProxy;
            Options = options.Value;
            Cache = cache;
        }
    
        public async Task<ApplicationConfigurationDto> GetAsync()
        {
            var cacheKey = CreateCacheKey();
            var httpContext = HttpContextAccessor?.HttpContext;
    
            if (httpContext != null && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration)
            {
                return configuration;
            }
    
            configuration = (await Cache.GetOrAddAsync(
                cacheKey,
                async () => await GetRemoteConfigurationAsync(),
                () => new DistributedCacheEntryOptions
                {
                    AbsoluteExpirationRelativeToNow = Options.ApplicationConfigurationDtoCacheAbsoluteExpiration
                }
            ))!;
    
            if (httpContext != null)
            {
                httpContext.Items[cacheKey] = configuration;
            }
    
            return configuration;
        }
    
        private async Task<ApplicationConfigurationDto> GetRemoteConfigurationAsync()
        {
            var config = await ApplicationConfigurationAppService.GetAsync(
                new ApplicationConfigurationRequestOptions
                {
                    IncludeLocalizationResources = false
                }
            );
    
            var localizationDto = await ApplicationLocalizationClientProxy.GetAsync(
                new ApplicationLocalizationRequestDto {
                    CultureName = config.Localization.CurrentCulture.Name,
                    OnlyDynamics = true
                }
            );
    
            config.Localization.Resources = localizationDto.Resources;
    
            return config;
        }
    
        public ApplicationConfigurationDto Get()
        {
            var cacheKey = CreateCacheKey();
            var httpContext = HttpContextAccessor?.HttpContext;
    
            if (httpContext != null && httpContext.Items[cacheKey] is ApplicationConfigurationDto configuration)
            {
                return configuration;
            }
    
            return AsyncHelper.RunSync(GetAsync);
        }
    
        protected virtual string CreateCacheKey()
        {
            return MvcCachedApplicationConfigurationClientHelper.CreateCacheKey(CurrentUser);
        }
    }
    
    
  • User Avatar
    0
    trendline created
    spublic override void PostConfigureServices(ServiceConfigurationContext context)
    {
        var logger = context.Services.GetRequiredService<ILogger<PointLinkWebModule>>();
        var mvcCachedApplicationConfigurationClient = context.Services.GetRequiredService<MvcCachedApplicationConfigurationClient>();
        var mvcCachedApplicationConfiguration = mvcCachedApplicationConfigurationClient.GetAsync().GetAwaiter().GetResult();
        if (mvcCachedApplicationConfiguration != null)
        {
            logger.LogInformation("MVC Cached Application Configuration: {Configuration}", mvcCachedApplicationConfiguration);
            //foreach (var configuration in mvcCachedApplicationConfiguration.)
            //{
            //    logger.LogInformation("mvcCachedApplicationConfiguration value: {Value}", configuration.Value);
            //}
        }
        else
        {
            logger.LogWarning("MVC Cached Application Configuration is null.");
        }
    }
        ```
    
    I did this, cannot inject the service
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Try resolve the ICachedApplicationConfigurationClient

    context.Services.GetRequiredService<ICachedApplicationConfigurationClient>();

  • User Avatar
    0
    trendline created

    the get service method doesn't work here context.Services.GetRequiredService<>, any other method to inject a service here?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Move your code from PostConfigureServices to OnApplicationInitialization

    The IServiceProvider will be available on OnApplicationInitialization

  • User Avatar
    0
    trendline created

    It seems even the menu doesn't appears, the Auth and Localization not retrieved values

    ` 2025-07-22 17:03:26.535 +08:00 [INF] MVC Cached Application Configuration: Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto 2025-07-22 17:03:26.536 +08:00 [INF] MVC Cached Application Configuration Auth: {} 2025-07-22 17:03:26.537 +08:00 [INF] MVC Cached Application Configuration Features: {"TextManagement.Enable":"true","SettingManagement.Enable":"true","SettingManagement.AllowChangingEmailSettings":"false","LeptonXManagement.Enable":"true","CmsKit.BlogEnable":"true","CmsKit.CommentEnable":"true","CmsKit.GlobalResourceEnable":"true","CmsKit.MenuEnable":"true","CmsKit.PageEnable":"true","CmsKit.RatingEnable":"true","CmsKit.ReactionEnable":"true","CmsKit.TagEnable":"true","CmsKit.MarkedItemEnable":"true","CmsKitPro.ContactEnable":"true","CmsKitPro.NewsletterEnable":"true","CmsKitPro.PollEnable":"true","CmsKitPro.UrlShortingEnable":"true","CmsKitPro.PageFeedbackEnable":"true","CmsKitPro.FaqEnable":"true","Identity.TwoFactor":"Optional","Identity.MaxUserCount":"0","Account.EnableLdapLogin":"False","Identity.EnableOAuthLogin":"False","LanguageManagement.Enable":"true","AuditLogging.Enable":"true","AuditLogging.SettingManagement":"false"} 2025-07-22 17:03:26.538 +08:00 [INF] MVC Cached Application Configuration Localization: {} 2025-07-22 17:03:26.538 +08:00 [INF] MVC Cached Application Configuration Setting: {"Abp.Localization.DefaultLanguage":"zh-Hans;zh-Hans","Abp.Timing.TimeZone":"","Volo.Abp.LeptonXTheme.ApplicationLayout":"SideMenu","CmsKit.Comments.RequireApprovement":"false","Volo.CmsKitPro.ContactReceiverEmailAddress":"info@mycompanyname.com","Volo.CmsKitPro.PageFeedbackIsAutoHandled":"True","Volo.CmsKitPro.PageFeedbackRequireCommentsForNegativeFeedback":"False","Volo.Saas.EnableTenantBasedConnectionStringManagement":"False","Abp.Identity.Password.RequiredLength":"6","Abp.Identity.Lockout.MaxFailedAccessAttempts":"5","Abp.Identity.Password.RequireDigit":"False","Abp.Identity.SignIn.RequireConfirmedPhoneNumber":"False","Abp.Identity.Lockout.LockoutDuration":"300","Abp.Identity.Password.PasswordChangePeriodDays":"0","Abp.Identity.Password.ForceUsersToPeriodicallyChangePassword":"False","Abp.Identity.SignIn.RequireConfirmedEmail":"False","Abp.Identity.User.IsUserNameUpdateEnabled":"True","Abp.Identity.Session.PreventConcurrentLogin":"Disabled","Abp.Identity.User.IsEmailUpdateEnabled":"True","Abp.Identity.Lockout.AllowedForNewUsers":"True","Abp.Identity.Password.RequireUppercase":"False","Abp.Identity.SignIn.EnablePhoneNumberConfirmation":"True","Abp.Identity.TwoFactor.UsersCanChange":"True","Abp.Identity.OrganizationUnit.MaxUserMembershipCount":"2147483647","Abp.Identity.Password.RequireNonAlphanumeric":"False","Abp.Identity.TwoFactor.Behaviour":"Optional","Abp.Identity.Password.RequiredUniqueChars":"1","Abp.Identity.Password.RequireLowercase":"False","Abp.Account.Idle.Enabled":"True","Abp.Account.Captcha.SiteKey":null,"Abp.Account.Captcha.UseCaptchaOnLogin":"false","Abp.Account.TwoFactorLogin.IsRememberBrowserEnabled":"true","Abp.Account.Captcha.Score":"0.5","Abp.Account.Idle.IdleTimeoutMinutes":"60","Abp.Account.IsSelfRegistrationEnabled":"true","Abp.Account.Captcha.VerifyBaseUrl":"https://www.google.com/","Abp.Account.ProfilePictureSource":"False","Abp.Account.EnableLocalLogin":"true","Abp.Account.PreventEmailEnumeration":"false","Abp.Account.Captcha.UseCaptchaOnRegistration":"false","Abp.Account.VerifyPasswordDuringExternalLogin":"False","Abp.Account.Captcha.Version":"3","EasyAbp.EShop.Products.Product.DefaultPaymentExpireIn":"00:15:00"} 2025-07-22 17:03:26.540 +08:00 [INF] Initialized all ABP modules.

    `

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please output the values of Auth and CurrentUser. They are used for Permission check.

  • User Avatar
    0
    trendline created

    The Auth and CurrentUser both are null 2025-07-22 17:10:19.277 +08:00 [INF] MVC Cached Application Configuration: Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto 2025-07-22 17:10:19.279 +08:00 [INF] MVC Cached Application Configuration Auth: [] 2025-07-22 17:10:19.281 +08:00 [INF] MVC Cached Application Configuration CurrentUser: null

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Please share the logs from the API website.

    You can consider sharing a project to reproduce the issue. It could be related to the access token.

  • User Avatar
    0
    trendline created

    This is the related logs:

    2025-07-22 18:43:50.418 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44357/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - null null
    2025-07-22 18:43:50.423 +08:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2025-07-22 18:43:50.423 +08:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationRequestOptions) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
    2025-07-22 18:43:50.424 +08:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'.
    2025-07-22 18:43:50.425 +08:00 [DBG] Executing AbpApplicationConfigurationAppService.GetAsync()...
    2025-07-22 18:43:50.504 +08:00 [DBG] Executed AbpApplicationConfigurationAppService.GetAsync().
    2025-07-22 18:43:50.504 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
    2025-07-22 18:43:50.504 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 81.1573ms
    2025-07-22 18:43:50.504 +08:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2025-07-22 18:43:50.504 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44357/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - 200 null application/json; charset=utf-8 85.8399ms
    2025-07-22 18:43:50.506 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44357/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0 - null null
    2025-07-22 18:43:50.509 +08:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2025-07-22 18:43:50.509 +08:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationLocalization", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController (Volo.Abp.AspNetCore.Mvc).
    2025-07-22 18:43:50.704 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto'.
    2025-07-22 18:43:50.704 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 194.5464ms
    2025-07-22 18:43:50.704 +08:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2025-07-22 18:43:50.704 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44357/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0 - 200 null application/json; charset=utf-8 198.4203ms
    2025-07-22 18:43:51.055 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44357/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - null null
    2025-07-22 18:43:51.059 +08:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2025-07-22 18:43:51.059 +08:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationRequestOptions) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
    2025-07-22 18:43:51.060 +08:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'.
    2025-07-22 18:43:51.060 +08:00 [DBG] Executing AbpApplicationConfigurationAppService.GetAsync()...
    2025-07-22 18:43:51.129 +08:00 [DBG] Executed AbpApplicationConfigurationAppService.GetAsync().
    2025-07-22 18:43:51.129 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
    2025-07-22 18:43:51.129 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 69.8878ms
    2025-07-22 18:43:51.129 +08:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2025-07-22 18:43:51.129 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44357/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - 200 null application/json; charset=utf-8 73.6633ms
    2025-07-22 18:43:51.130 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44357/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0 - null null
    2025-07-22 18:43:51.134 +08:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2025-07-22 18:43:51.134 +08:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationLocalization", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController (Volo.Abp.AspNetCore.Mvc).
    2025-07-22 18:43:51.324 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto'.
    2025-07-22 18:43:51.324 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 190.6994ms
    2025-07-22 18:43:51.324 +08:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
    2025-07-22 18:43:51.324 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44357/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0 - 200 null application/json; charset=utf-8 194.0796ms
    
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Pelase enable debug logs

    var loggerConfiguration = new LoggerConfiguration()
        .MinimumLevel.Debug()
        .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
        .Enrich.FromLogContext()
        .WriteTo.Async(c => c.File("Logs/logs.txt"))
    
  • User Avatar
    0
    trendline created

    below are the logs after add debug info follow up your suggestion, it seems no more info logged

    2025-07-22 20:19:27.918 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44357/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - null null 2025-07-22 20:19:27.924 +08:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2025-07-22 20:19:27.924 +08:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationRequestOptions) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc). 2025-07-22 20:19:27.928 +08:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'. 2025-07-22 20:19:27.928 +08:00 [DBG] Executing AbpApplicationConfigurationAppService.GetAsync()... 2025-07-22 20:19:28.050 +08:00 [DBG] Executed AbpApplicationConfigurationAppService.GetAsync(). 2025-07-22 20:19:28.050 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'. 2025-07-22 20:19:28.051 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 126.2675ms 2025-07-22 20:19:28.051 +08:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2025-07-22 20:19:28.051 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44357/api/abp/application-configuration?IncludeLocalizationResources=False&api-version=1.0 - 200 null application/json; charset=utf-8 132.6133ms 2025-07-22 20:19:28.052 +08:00 [INF] Request starting HTTP/1.1 GET http://localhost:44357/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0 - null null 2025-07-22 20:19:28.059 +08:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2025-07-22 20:19:28.059 +08:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationLocalization", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController (Volo.Abp.AspNetCore.Mvc). 2025-07-22 20:19:28.365 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto'. 2025-07-22 20:19:28.365 +08:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 305.6032ms 2025-07-22 20:19:28.365 +08:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)' 2025-07-22 20:19:28.365 +08:00 [INF] Request finished HTTP/1.1 GET http://localhost:44357/api/abp/application-localization?CultureName=zh-Hans&OnlyDynamics=True&api-version=1.0 - 200 null application/json; charset=utf-8 312.3666ms

    `

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    What is your Program.cs file content?

  • User Avatar
    0
    trendline created

    here is the API app program file code:

    Log.Logger = new LoggerConfiguration()
            .MinimumLevel.Debug()
            .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
            .Enrich.FromLogContext()
            .WriteTo.Async(c => c.File("Logs/logs.txt", rollingInterval: RollingInterval.Day))
            .WriteTo.Async(c => c.Console())
            .CreateBootstrapLogger();
    
        try
        {
            Log.Information($"Starting {GetCurrentAssemblyName()}");
    
            AbpStudioEnvironmentVariableLoader.Load();
    
            var builder = WebApplication.CreateBuilder(args);
    
            builder.Host
                .AddAppSettingsSecretsJson()
                .UseAutofac()
                .UseSerilog((context, services, loggerConfiguration) =>
                {
                    var applicationName = services.GetRequiredService<IApplicationInfoAccessor>().ApplicationName;
    
                    loggerConfiguration
                    #if DEBUG
                        .MinimumLevel.Debug()
                        .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
                        .Enrich.FromLogContext()
                    #else
                        .MinimumLevel.Information()
                    #endif
                        .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
                        .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
                        .Enrich.FromLogContext()
                        .Enrich.WithProperty("Application", applicationName)
                        .If(context.Configuration.GetValue<bool>("ElasticSearch:IsLoggingEnabled"), c =>
                            c.WriteTo.Elasticsearch(
                                new ElasticsearchSinkOptions(new Uri(context.Configuration["ElasticSearch:Url"]!))
                                {
                                    AutoRegisterTemplate = true,
                                    AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv6,
                                    IndexFormat = "PointLink-log-{0:yyyy.MM}"
                                })
                        )
                        .WriteTo.Async(c => c.File("Logs/logs.txt", rollingInterval: RollingInterval.Day))
                        .WriteTo.Async(c => c.Console())
                        .WriteTo.Async(c => c.AbpStudio(services));
                });
    
            await builder.AddApplicationAsync<PointLinkAdministrationServiceModule>();
    
            var app = builder.Build();
    
            await app.InitializeApplicationAsync();
            await app.RunAsync();
    
            Log.Information($"Stopped {GetCurrentAssemblyName()}");
    
            return 0;
        }
        catch (HostAbortedException)
        {
            /* Ignoring this exception because: https://github.com/dotnet/efcore/issues/29809#issuecomment-1345132260 */
            return 2;
        }
        catch (Exception ex)
        {
            Console.WriteLine($"{GetCurrentAssemblyName()} terminated unexpectedly!");
            Console.WriteLine(ex.ToString());
            Console.WriteLine(ex.StackTrace ?? "");
    
            Log.Fatal(ex, $"{GetCurrentAssemblyName()} terminated unexpectedly!");
            Log.Fatal(ex.Message);
            Log.Fatal(ex.StackTrace ?? "");
            return 1;
        }
        finally
        {
            await Log.CloseAndFlushAsync();
        }
    }
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    We need to confirm the application-configuration request has a valid bearer token.

    GET http://localhost:44357/api/abp/application-configuration

    loggerConfiguration
        .MinimumLevel.Debug()
        .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
        .Enrich.FromLogContext()
        .Enrich.WithProperty("Application", applicationName)
        .If(context.Configuration.GetValue<bool>("ElasticSearch:IsLoggingEnabled"), c =>
            c.WriteTo.Elasticsearch(
                new ElasticsearchSinkOptions(new Uri(context.Configuration["ElasticSearch:Url"]!))
                {
                    AutoRegisterTemplate = true,
                    AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv6,
                    IndexFormat = "PointLink-log-{0:yyyy.MM}"
                })
        )
        .WriteTo.Async(c => c.File("Logs/logs.txt", rollingInterval: RollingInterval.Day))
        .WriteTo.Async(c => c.Console())
        .WriteTo.Async(c => c.AbpStudio(services));
    
  • User Avatar
    0
    trendline created

    That is right, my local environment debug already configured it as you suggested

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    However, your log does not include the debug logs. Could you share a project that reproduces the problem?

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Remove AbpAspNetCoreMvcclientModule from authserver fix this problem.

  • User Avatar
    0
    trendline created

    Thanks a lot for maliming's help, a redundant module depends caused an odd bug

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ; )

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.0.0-preview. Updated on September 01, 2025, 08:37