2

我在asp MVC 3中有这个表格

<form action="/account/changeemail" id="form_changeemail" method="post">
    <%=Html.AntiForgeryToken()%>
    <input  type="email" name="email" id="email" class="required email" />
    <button class="green button" type="submit" id="changeemail">Change</button>
</form>

而这个动作

[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult ChangeEmail(string email)
{

}

在IOS上的Safari上,这总是给我

所需的防伪令牌未提供或无效

这是浏览器的用户代理

Mozilla/5.0 (iPhone; CPU iPhone OS 7_0_3 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B511 Safari/9537.53

我查看了 cookie,请求验证令牌的设置为 2001 年 1 月 1 日。

有任何想法吗?谢谢

4

1 回答 1

-3

选择后这对我有用。

前往野生动物园Settings >> Preferences... >> Privacy tab

  1. 单击删除所有网站数据
  2. 将阻止 cookie 选择为从不

于 2015-09-04T06:23:54.410 回答