This project is read-only.

HttpAntiForgeryException was unhandeled by user code

Topics: Administration, Customizing Orchard
Dec 3, 2012 at 6:04 PM

I am new to orchard and trying to customize the orchard website using visual studio 2012, but I didn't add any line of code. I just run the project then I wanted to add new content-content type->new content type. any idea please.

when I just write the name in the display name I got this error I tried it more than one time but with same error.

HttpAntiForgeryException was unhandeled by user code

The required anti-forgery form field "__RequestVerificationToken" is not present.

System.Web.Mvc.HttpAntiForgeryException was unhandled by user code
  Message=The required anti-forgery form field "__RequestVerificationToken" is not present.
       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.Helpers.AntiForgery.Validate()
       at System.Web.Mvc.ValidateAntiForgeryTokenAttribute.OnAuthorization(AuthorizationContext filterContext)
       at Orchard.Mvc.AntiForgery.AntiForgeryAuthorizationFilter.OnAuthorization(AuthorizationContext filterContext) in c:\Users\Hani\Desktop\orchard\Orchard.Source.1.6\src\Orchard\Mvc\AntiForgery\AntiForgeryAuthorizationFilter.cs:line 36
       at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
       at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

Dec 3, 2012 at 7:14 PM

I can't reproduce that. Did you set-up a machine key? 

Dec 3, 2012 at 7:54 PM

sorry I am new to orchard. can you explain how to set-up a machine key..


Dec 3, 2012 at 8:01 PM

Sure. (link is in the release notes by the way ;)