warrenbuckley / CWS-Umbraco-Standard-Membership

This is used to give an example standard membership to Umbraco V6 +
19 stars 9 forks source link

anti-forgery cookie is not present #13

Open optimus140 opened 11 years ago

optimus140 commented 11 years ago

I'm getting a yellow screen message The required anti-forgery cookie "__RequestVerificationToken" is not present.

How do I include the anti-forgery cookie? Thanks for any guidance, I appreciate it!

optimus140 commented 11 years ago

also, I wanted to mention I added this to my project with nuget. It appears that 1.0.8 from nuget doesn't have the antiforgery tokens in the cshtml files

mptrs commented 11 years ago

You can see an example of how to implement this here

The controller asks for the AntiForgeryToken by adding [ValidateAntiForgeryToken] to the action , the form than has to have a @Html.AntiForgeryToken() to send to the controller. Correct me if I'm wrong.

Hope this helps.

optimus140 commented 11 years ago

Ok great I added those and that seemed to fix. Not sure why those were missing, I didn't remove them or anything. I added this to a visual studio project with nuget