Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException #128

Open
jonnyry opened this issue Feb 25, 2021 · 1 comment
Open

Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException #128

jonnyry opened this issue Feb 25, 2021 · 1 comment
Assignees
Milestone

Comments

@jonnyry
Copy link
Member

jonnyry commented Feb 25, 2021

This has appear in the error log a few times in live:

{
  "type": "Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException",
  "message": "The antiforgery token could not be decrypted.",
  "stacktrace": "   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)\n   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)",
  "innerException": {
    "type": "System.Security.Cryptography.CryptographicException",
    "message": "The key {a8fec002-8507-4ee1-a374-18f630320b67} was not found in the key ring.",
    "stacktrace": "   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)\n   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked)\n   at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)\n   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)"
  }
}
@jonnyry jonnyry added this to the 1.2 milestone Feb 25, 2021
@jonnyry jonnyry modified the milestones: 1.2, 1.3 Mar 8, 2021
@jonnyry jonnyry modified the milestones: 1.3, Later Mar 17, 2021
@jonnyry
Copy link
Member Author

jonnyry commented Mar 19, 2021

Looks like this... https://stackoverflow.com/a/63444154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants