c# The key {xxx} was not found in the key ring

404 (),      An exception was thrown while deserializing the token.,Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---> System.Security.Cryptography.CryptographicException: The key {xxx} was not found in the key ring.,fail: Microsoft.AspNetCore.Antiforgery.Internal.DefaultAntiforgery[7],   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status),   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked),Application started. Press Ctrl+C to shut down.

参考:Error unprotecting the session cookie.The key {...} was not found in the key ring. - 走看看 (zoukankan.com)

 

解决方式贴出来:把浏览器关闭再打开,就可以了。

posted @ 2022-09-08 16:23  神舟龙  阅读(445)  评论(0编辑  收藏  举报