Open Closed

Need Help - An exception was thrown while deserializing the token (ASP.NET Core Data Protection) #5552


User avatar
1
arvind.srivastava.tas created
Team - We need your help to fix this issue related to ASP.NET Core Data Protection and we are getting the below exception:

An exception was thrown while deserializing the token fail: Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery[7] 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 {6b4986b7-d78c-42ac-985c-551a682fb951} was not found in the key ring. For more information go to http://aka.ms/dataprotectionwarning at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) --- End of inner exception stack trace --- at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken) at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)*

  • ABP Framework version: v7.3.0
  • UI type: Angular
  • DB provider: EF Core / Postgres
  • Tiered (MVC) or Auth Server Separated (Angular): Yes
  • Exception message and stack trace
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    arvind.srivastava.tas created

    Team - Any update for the same?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    -1
    liangshiwei created
    Fullstack Developer

    Hi,

    Maybe there is an answer in the support. You can have a look. https://support.abp.io/QA/Questions?Sort=LastActivityDate-desc&Filter=%22The+antiforgery+token+could+not+be+decrypted%22

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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.