添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Info:

System.Web.Mvc.HttpAntiForgeryException (0x80004005): The anti-forgery cookie token and form field token do not match.

at System.Web.Helpers.AntiXsrf.TokenValidator.ValidateTokens(HttpContextBase httpContext, IIdentity identity, AntiForgeryToken sessionToken, AntiForgeryToken fieldToken)

at System.Web.Helpers.AntiXsrf.AntiForgeryWorker.Validate(HttpContextBase httpContext)

at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)

at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__1e(AsyncCallback asyncCallback, Object asyncState)

Resolution 1

Enable some form of sticky session persistence to make sure that requests from the same IP or from the same user is handled by the same Password Manager server until the session is completed.

Check the documentation that comes with your load balancer for details on how to configure session persistence.

Generate Machine Keys:

https://blogs.msdn.microsoft.com/vijaysk/2009/05/13/iis-7-tip-10-you-can-generate-machine-keys-from-the-iis-manager/


The machine keys should be placed inside the section of the web.config file as suggested Microsoft.

https://msdn.microsoft.com/en-us/library/w8h3skw9%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396