Troubleshooting anti-forgery token problems

前端 未结 11 2075
孤城傲影
孤城傲影 2020-11-27 03:48

I have a form post that consistently gives me an anti-forgery token error.

Here is my form:

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
         


        
11条回答
  •  无人及你
    2020-11-27 04:27

    Another possible thing to check which has caused this error for me: I had two @Html.AntiForgeryToken() in one of my forms.

    Once that was removed problem went away.

提交回复
热议问题