0

I have a delete form that looks like this:

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()    
    <p>
    <input type="submit" value="Delete"/> |
    @Html.ActionLink("Back to List", "Index")
    </p>
}

But my controller action is complaining that __RequestVerificationToken is not present. I'm confused. I put the AntiForgeryToken in there. When I view the rendered HTML for the delete form, there is no hidden field--as if the AntiForgeryToken call is just being skipped. But why?

Adam O'Neil
  • 667
  • 1
  • 8
  • 18
  • 1
    Take a look at the various causes and solutions of this error: http://stackoverflow.com/questions/5767768/troubleshooting-anti-forgery-token-problems If nothing helps, be sure to mention it here. – user247702 Jul 09 '13 at 18:21
  • I saw that one, but it didn't seem to address my symptoms, and some of the discussion was over my head unfortunately. In my case, the token is simply not rendering. It's not a problem in the controller, in other words. Rather, the hidden field is not making into the form even though I'm asking for it.... – Adam O'Neil Jul 09 '13 at 19:32

0 Answers0