<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head><meta forua="true" http-equiv="Cache-Control" content="max-age=0" /></head>
<card title="Validation of viewstate MAC failed的ASP.net网页的解决办法" id="card1">
<p> 游客</p><p>
标题:Validation of viewstate MAC failed的ASP.net网页的解决办法<br/>
正文:<br/>
 在本地调试一直没有问题，但是虚拟空间的老是有问题，联系客服，她们也搞不懂。自己上网查了查这个问题。跟ViewState中的Mac地址校验有关系，以前这个网页运行一直正常，估计是网站配置发生改变导致。经过在网页的顶部增加&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot;  enableViewStateMac=&amp;quot;false&amp;quot; %&amp;gt; ，中间的黑体部分，问题解决，估计是.net2.0的遗留问题，以后还是使用 Server Error in '/' Application. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that &amp;lt;machineKey&amp;gt; configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.   Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that &amp;lt;machineKey&amp;gt; configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in <br/><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=617&amp;Page=1">[&lt;&lt;]</a><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=617&amp;Page=1">[[1]]</a><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=617&amp;Page=2">[2]</a><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=617&amp;Page=3">[3]</a><a href="http://www.zhongguosou.com/blog/wap.asp?mode=WAP&amp;act=View&amp;id=617&amp;Page=5">[&gt;&gt;]</a><br/>
<br/>
<a href="wap.asp?act=Com&amp;id=617">查看评论(0)</a><br/>
<a href="wap.asp?act=AddCom&amp;inpId=617">发表评论</a><br/><br/>

<br/>

<br/>
<a href="http://www.zhongguosou.com/blog/wap.asp">首页</a>
</p>
</card>
</wml>