首页 > 网站 > 建站经验 > 正文

Validation of viewstate MAC failed.的解决方法

2019-11-02 16:42:38
字体:
来源:转载
供稿:网友
办法:页面的顶部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 <machineKey> 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 <machineKey> 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 <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]
发表评论 共有0条评论
用户名: 密码:
验证码: 匿名发表