当我尝试使用 FireFox4 登录时,我收到错误消息(其他浏览器没有错误):
检查表单 MAC 的状态失败。如果应用程序是 Web Farm 或集群,请确保配置指向相同的验证密钥 validationKey 和验证算法。AutoGenerate 不能在集群中使用。
[ViewStateException:
Client IP: ::1
Port:
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0
ViewState: X+K7IAAB3XrqQMf0Ym7ZlHeMzvcISEek8a8NX07/uIQ1jEdwJp+/fisjPu64BgVKohucBKZxiX6vdxG+GNAS4qGMJbyCAfB6hwEKvpR9Df9o9gBj5MJTF2AHA6YO87XVvqbC3TNlTBSQ1OLakVvy7Q==
Referer: http://localhost:1062/
Path: /login]
登录页面很简单:
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" Inherits="ModelViewPage<Graphite.Web.Controllers.Login.LoginViewModel>" %>
<%@ Import Namespace="Graphite.Web.Controllers.Login" %>
<asp:Content ContentPlaceHolderID="main" runat="server" >
<%
using (Html.BeginForm("Authenticate","Login")) {%>
<div class="formInput">
<%= this.TextBox(x => x.Username).Label("Username: ")%>
</div>
<div class="formInput">
<%= this.Password(x => x.Password).Label("Password: ")%>
</div>
<%=Html.AntiForgeryToken()%>
<%=this.SubmitButton("Login")%>
<%
}%>
</asp:Content>
我试图禁用诸如无脚本之类的愤怒添加,但这对我没有帮助。