How to find our why AntiForgery Token fails?

0

I am receiving this error every some time in my Logs file (on umbraco):

 2019-12-31 11:56:20,942 [P18400/D2/T18] ERROR Umbraco.Web.WebApi.Filters.AngularAntiForgeryHelper - Could not validate XSRF token
System.Web.Mvc.HttpAntiForgeryException (0x80004005): The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the <machineKey> configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.
   at System.Web.Helpers.AntiXsrf.AntiForgeryTokenSerializer.Deserialize(String serializedToken)
   at System.Web.Helpers.AntiXsrf.AntiForgeryWorker.Validate(HttpContextBase httpContext, String cookieToken, String formToken)
   at System.Web.Helpers.AntiForgery.Validate(String cookieToken, String formToken)
   at Umbraco.Web.WebApi.Filters.AngularAntiForgeryHelper.ValidateTokens(String cookieToken, String headerToken)

Is there any way to find out what page/ form it happens for? Or why the token fails?

I already had issue people simply were browsing the site and checking prices when the error happened so I was getting a bad customer experience.

I need to know why or at what point the antiforgery token fails.

I am using umbraco 7.15.1 if this matters with .NET 4.5.2.

I have several project within the solution and all of them run .NET 4.5.2. The site doesn't run on any load balancing or cloud, just one dedicated server.

I don't think I have machine key installed and I understand that I don't need it if I do not use load balancing?

c#
logging
umbraco7
antiforgerytoken
asked on Stack Overflow Dec 31, 2019 by nickornotto

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0