Reputation: 687
I am getting AntiForgery error on Production server intermittently. Details:-
System.Web.Mvc.HttpAntiForgeryException (0x80004005): The anti-forgery cookie token and form field token do not match. Steps to produce:- * Logged in to site * Leave it open for long or close the browse * Open the login page again after 1-2 hour.. you may get this error of anti forgery token "The anti-forgery cookie token and form field token do not match." But its not guaranteed that we encounter error. We get error only intermittently which gets resolved once user try to login again.
I tried so many option but could not resolve the issue.
Upvotes: 1
Views: 1040
Reputation: 395
the reason for this error can be 1. you have setup the server at a new location or 2. you have reset the IIS while the application is still in use for some client (because on reset it generates a new token for that session)
Upvotes: 1