[22:41:33][Information][7|][Identity.Application was not authenticated. Failure message: Unprotect ticket failed|]
[22:41:33][Information][2|][Authorization failed for user: (null).|]
[22:41:33][Information][3|][Authorization failed for the request at filter 'Microsoft.AspNetCore.Mvc.Authorization.AuthorizeFilter'.|]
[22:41:33][Information][1|][Executing ChallengeResult with authentication schemes ().|]
[22:41:33][Information][12|][AuthenticationScheme: Identity.Application was challenged.|]
偶尔会出现这个错误是什么情况造成的?
如何解?
1 services.ConfigureApplicationCookie(options => { 2 options.Cookie.HttpOnly = true; 3 options.AccessDeniedPath = "/error/accessdenied"; 4 options.LoginPath = "/admin/account/login"; 5 });
没其他地方有设置关于Cookie的相关内容了
出现这个错误是由于解密Cookie失败
要怎么处理?
@远扬: 这个错误有没有影响到正常使用?
@dudu: 出现这个错误的时候会客户端一直在加载,查看日志显示错误内容是这些
@远扬: 建议使用 redis 保存 Data Protection key ,参考 Key storage providers in ASP.NET Core
@dudu: 根据你这个方式保存Data Protection key,还会出现
Identity.Application was not authenticated. Failure message: Unprotect ticket failed
这个错误,但已经不会影响到正常使用了