Activities of "heshengli"

.AuthServer.deps.json 有Microsoft.Win32.Registry.dll,但是linux x64发布,发布程序文件中不包含此文件,然后采用docker compose 以docker 发布。出现这个问题后,重启docker也自动回复了

就是采用docker发布,和采用了redis的方式DataProtection,builder.Services.AddDataProtection() .PersistKeysToFileSystem(new DirectoryInfo(Path.Combine(builder.Environment.ContentRootPath, "DataProtection-Keys")));

依然报上面的错误

  • Exception message and full stack trace:An unhandled exception has occurred while executing the request. System.Security.Cryptography.CryptographicException: An error occurred while trying to encrypt the provided data. Refer to the inner exception for more information. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Extensions.Logging.LoggingExtensions' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Win32.Registry, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

File name: 'Microsoft.Win32.Registry, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' --- End of inner exception stack trace --- at Microsoft.Extensions.Logging.LoggingExtensions.ErrorOccurredWhileRefreshingKeyRing(ILogger logger, Exception exception) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, Boolean forceRefresh) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) --- End of inner exception stack trace --- at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Protect(Byte[] plaintext) at Microsoft.AspNetCore.Components.Infrastructure.ComponentStatePersistenceManager.<>c__DisplayClass9_0.<<PersistStateAsync>g__PersistState|1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Components.Infrastructure.ComponentStatePersistenceManager.<>c__DisplayClass9_0.<<PersistStateAsync>g__PauseAndPersistState|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.PrerenderPersistedStateAsync(HttpContext httpContext) at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context) at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context) at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__10_0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger) at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.Claims.AbpDynamicClaimsMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpOpenIddictMiddlewareExtension.<>c__DisplayClass0_0.<<UseAbpOpenIddictValidation>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)

  • Steps to reproduce the issue:

好的 我们在退出登录,同时也删除了当前用户的缓存

当我们收藏一个openiddict 的重定向地址,间隔很多天后,使用这个链接跳转登录后,偶发权限丢失 正常情况 异常情况

Cookie 365天 Cookie的AccessToken 有效期多长时间, var accessToken = principalContext.Properties.GetTokenValue("access_token");

我们使用的是默认的IntrospectAccessToken,UI 上显示还是已登录状态,菜单权限都丢失了, IntrospectAccessToken The access_token is not active.触发退出登录后,会重定向重新登录

不知道如何复现,但是导致权限丢失之后的现象是,application-configuration cache,可以 currentUser.Id 是用户信息 application-configuration value,currentUser 却是null,手动删除这个key 可以恢复

不是一个问题,https://github.com/abpframework/abp/pull/24486 是通过角色和用户赋权之后,权限不刷新的问题(延迟问题), 没有操作用户权限情况下,权限丢失,application-configuration cache 的用户信息和权限信息都不对

blazorserver 前后端分离blazorHost ApiHost, application-configuration cache 存储请求上下文权限和身份信息。 ` public async Task

    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;
}

` 源码 MvcCachedApplicationConfigurationClient和RemotePermissionChecker

Showing 1 to 10 of 91 entries
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.