The antiforgery token could not be decrypted

Deadly 提交于 2021-02-19 01:11:58

问题


I have an identity server asp net core project deployed in Azure, i also have two asp net 5 mvc client using my identity server as SSO, and continuously i am getting(save in logs) an exception The antiforgery token could not be decrypted.


回答1:


We had similar issue today, We were able to resolve by persisting data protection keys to file system .

  services.AddDataProtection()
                .PersistKeysToFileSystem(new DirectoryInfo(@"\\UNC-PATH"));



回答2:


We had the same error message

Antiforgery token validation failed. The antiforgery token could not be decrypted.

on an app which runs on disributed instances, we decreased the instance to one then problem is solved. This solution may save hours of someone one day..



来源:https://stackoverflow.com/questions/42542923/the-antiforgery-token-could-not-be-decrypted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!