Site breaks when doing to Login page after some time

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
один год назад
When I leave the site open and then goto login site crashes, has happened quite a few times:

In event viewer I see:

Category: Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery
EventId: 7
SpanId: 490028d2f56d1d73
TraceId: 90ff3d44e810869dc6a00456d9c7c7c9
ParentId: 0000000000000000
RequestId: 8000000e-0009-f400-b63f-84710c7967bb
RequestPath: /
ActionId: fe4c52a2-5a3a-4706-ba4c-63f6961e22f3
ActionName: Nop.Web.Controllers.HomeController.Index (Nop.Web)

An exception was thrown while deserializing the token.

Exception:
Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted.
---> System.Security.Cryptography.CryptographicException: The key {e1516402-f06b-49fb-b9f2-ffed54cd1070} 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)


No idea what this is!
один год назад
Make sure that directory "App_Data/DataProtectionKeys" contains files "key.{guid}.xml", that they are not deleted, and that you have read/write access to them.
один год назад
I am restarting the site a lot on IIS can it be the reason for this as i noticed it happens close to when I restart the site on IIS.
один год назад
RomanovM wrote:
Make sure that directory "App_Data/DataProtectionKeys" contains files "key.{guid}.xml", that they are not deleted, and that you have read/write access to them.


I'm getting the same when running a pod in Kubernetes. What would be the suggested setup if using Kubernetes?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.