ASP.net Core 3.1 Jquery -.net core 3.1 Were receiving this exception multiple time in our Host service:
An exception was thrown while deserializing the token. Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted.
We're seeing increase in CPU usage as well and not sure if it is related.
3 Answer(s)
-
0
Hi @kansoftware
I think this is not related to high memory usage. Could you check this https://medium.com/drunkcoding/anti-forgery-token-and-machine-key-6cb4cc65fc73 ?
-
0
this is fine for mvc this option not available in .net
-
0
Hi,
Sorry, you are right. For ASP.NET Core, you can check https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/configuration/overview?view=aspnetcore-6.0. You need to store data protection keys in a sharaed location for all instances of your app.