Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anti-forgery cookie is not present #13

Open
optimus140 opened this issue Jul 3, 2013 · 3 comments
Open

anti-forgery cookie is not present #13

optimus140 opened this issue Jul 3, 2013 · 3 comments

Comments

@optimus140
Copy link

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
Copy link
Author

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
Copy link

mptrs commented Jul 5, 2013

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants