编程语言
首页 > 编程语言> > c# The key {xxx} was not found in the key ring

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)

 

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

标签:c#,AspNetCore,xxx,Boolean,key,ring,was,Microsoft
来源: https://www.cnblogs.com/shenzhoulong/p/16669859.html