验证上的Default.aspx我写了这个代码,它成功地展示了我WebForm1.aspx的,但它也有一个按钮,当我点击这个按钮,它给我的错误视图状态与GetCompiledPageInstance
protected void Page_Load(object sender, EventArgs e)
{
var pageView = PageParser.GetCompiledPageInstance("~/WebForm1.aspx", Server.MapPath("~/WebForm1.aspx"), HttpContext.Current);
(pageView).ProcessRequest(HttpContext.Current);
}
按钮错误点击
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
你可以更新你的问题,并告诉我们更多关于你的webconfig在这方面以及两个ASPX文件中的完整@Page指令吗?它是一个必须知道,为了找到一个明确的解决方案 – KMX 2013-02-28 05:51:08