必填的防伪表单字段“__RequestVerificationToken"不存在用户注册错误 [英] The required anti-forgery form field "__RequestVerificationToken" is not present Error in user Registration
本文介绍了必填的防伪表单字段“__RequestVerificationToken"不存在用户注册错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Membership.create
用户函数,然后出现以下错误,
I am using Membership.create
user function, then the following error is occurring,
所需的防伪表单字段__RequestVerificationToken"是不存在
The required anti-forgery form field "__RequestVerificationToken" is not present
我该如何解决这个问题?
How can I fix this?
推荐答案
你在你的行动之前有 [ValidateAntiForgeryToken]
属性.您还应该在表单中添加 @Html.AntiForgeryToken()
.
You have [ValidateAntiForgeryToken]
attribute before your action. You also should add @Html.AntiForgeryToken()
in your form.
这篇关于必填的防伪表单字段“__RequestVerificationToken"不存在用户注册错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文