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

后端 未结 19 1256
旧巷少年郎
旧巷少年郎 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:41

    You have [ValidateAntiForgeryToken] attribute before your action. You also should add @Html.AntiForgeryToken() in your form.

提交回复
热议问题