enableviewstatemac ashx ajax post,Validation of viewstate MAC failed.的解决方法

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,

还是有问题,

相关文章

1a1b05c64693fbf380aa1344a7812747.png

Windows 2003 IIS 6.0 搭建可建虚拟机的asp+.net+php+jsp+mysql+mssql...2007-05-05

4f55910a645b073bc4fc65dc10dc14bd.png

Win2003 Server安全配置完整篇 端口关闭...2007-05-05

0ea3c7666119d5615e582f823fb3fad6.png

"automation服务器不能创建对象”的问题的解决方案总结大全...2007-04-04

4f96a78db829b1556ff16de21e013c7a.png

Web服务器安全完全指南...2007-08-08

8cc1031babc6aff2319f1c6af8544aa0.png

17 New OSPF Feature...2007-04-04

0c932a99bb7b6f23c937db507070cc7b.png

以下过程在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

cca732bf65a93ed2ec0ac80c638460fe.png

MySQL用户管理...2006-10-10

b452cee8ec5cd9e58ab98eba17281e59.png

配置之前,但是是去找个合适的地方下载。现在,PHP已经发展到PHP4了,所以,我只是将PHP4的安装配置介绍给大家,其实PHP3的配置和PHP4是差不多的。另外,考虑到我本人用Linux用得少,而且,绝大多数人用win系统,所以,在本站只将win下的配置。2008-03-03

f4838ec7e2d4da28e0b57d4e852dadd4.png

WIN服务器安全批处理文件...2006-12-12

最新评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值