應用程式中發生伺服器錯誤。
The required anti-forgery form field "__RequestVerificationToken" is not present.
解決方式:
在View 送出的Form頁面using處下方,要加入下面字眼
@Html.AntiForgeryToken()
(Solutions)
You have [ValidateAntiForgeryToken] attribute before your action.
You should add @Html.AntiForgeryToken() in your form.
Example:
@using(Html.BeginForm())
{
@Html.AntiForgeryToken()
<input name="..." type="text" />
}
No comments:
Post a Comment