The required anti-forgery form field “__RequestVerificationToken” is not present Error in user Registration

后端 未结 19 1299
旧巷少年郎
旧巷少年郎 2020-11-29 22:12

I am using Membership.create user function, then the following error is occurring,

The required anti-forgery form field \"__RequestVerifi

19条回答
  •  孤街浪徒
    2020-11-29 22:20

    In my EPiServer solution on several controllers there was a ContentOutputCache attribute on the Index action which accepted HttpGet. Each view for those actions contained a form which was posting to a HttpPost action to the same controller or to a different one. As soon as I removed that attribute from all of those Index actions problem was gone.

提交回复
热议问题