Validation of viewstate MAC failed.的解决方法
更新时间:2007年10月05日 22:36:04 作者:
办法:页面的顶部page加 EnableViewState="False" EnableViewStateMac = "False" 来解决这个问题
根据框架的提示如下:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that 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 configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.
Source Error:
[No relevant source lines]
Source File: h:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\df4db950\a034e6a\App_Web_o9fr0nmx.18.cs Line: 0
Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2546780
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +214
[ViewStateException: Invalid viewstate.
Client IP: 202.119.199.112
Port: 1242
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
ViewState: /wEPDwUJNTM4MjQxOTkxZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUMSW1hZ2VCdXR0b24xjUihQtAeI0cDU56BxkYGL8w1G/4=
Referer: http://download.cumt.edu.cn/Admin/login.aspx
Path: /Admin/login.aspx]
[HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +251
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +154
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.admin_login_aspx.ProcessRequest(HttpContext context) in h:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\df4db950\a034e6a\App_Web_o9fr0nmx.18.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
在使用了网上的EnableViewStateMac="false"后,
具体的问题就是保存不了session,修改了web.config里的配置还是一样的,后来还是没解决,只好还原了iis,
还是有问题,
相关文章
Windows 2003 IIS 6.0 搭建可建虚拟机的asp+.net+php+jsp+mysql+mssql...2007-05-05
Win2003 Server安全配置完整篇 端口关闭...2007-05-05
"automation服务器不能创建对象”的问题的解决方案总结大全...2007-04-04
Web服务器安全完全指南...2007-08-08
17 New OSPF Feature...2007-04-04
以下过程在redhat6.2 7.0下通过。
使用软件:
apache_1.3.19.tar.gz
imap-2000c.tar.Z
mod_jserv.so..so
j2sdk-1_3_0_02-linux.bin
mysql-3.23.33-pc-linux-gnu-i6862.tar.gz
openldap-2.0.7.tar.gz
php-4.0.4pl1.tar.gz
jakarta-tomcat-3.3-m2.tar.gz
phpMyAdmin_2.1.0.tar.gz2008-03-03
MySQL用户管理...2006-10-10
配置之前,但是是去找个合适的地方下载。现在,PHP已经发展到PHP4了,所以,我只是将PHP4的安装配置介绍给大家,其实PHP3的配置和PHP4是差不多的。另外,考虑到我本人用Linux用得少,而且,绝大多数人用win系统,所以,在本站只将win下的配置。2008-03-03
WIN服务器安全批处理文件...2006-12-12
最新评论