none
The antiforgery token could not be decrypted RRS feed

  • Question

  • Hello, I am facing an issue with .NET Authorization. Application built using ASP.NET  Core 3.0 and using Cookie Authentication & authorization. Error in the logs shows Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted. ---u003e System.Security.Cryptography.CryptographicException: The key {XXXXXXXXXXXXXXXXXXXXXX} was not found in the key ring. I have used ASP.NET Data Protection to store Keys persistently in prostgreSQL database. Deployment environment: 4 cluster on Kubernetes on CentOS 7 Operating. Looking forward for any help in this regards to resolve the issue.
    Wednesday, December 4, 2019 12:29 PM

All replies

  • Hi FaizRefai,

    Welcome to MSDN forum.

    >> I have used ASP .NET Data Protection to store Keys persistently in prostgreSQL database.

    ## According to your description, I consider this issue may be caused by your stored procedure. And, like the error message reminds, “The key {XXXXX} was not found in the key ring”, I suggest you could check your stored procedure.

    You could also refer to this similar issue Random: The antiforgery token could not be decrypted, although, in this case, using .Net Core 2.1.4.

    Hope this could help you.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 5, 2019 5:43 AM
  • Hi FaizRefai,

    Sorry to bother you.

    According to your description, it seems that the Microsoft key and feed doesn't register your system. Please open terminal, then type the command below:

    sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

    And if it persists, please follow the doc to re-install .NET core: Install .NET Core

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, December 9, 2019 9:48 AM