如何解决viewstate MAC验证失败。 [英] how to solve the Validation of viewstate MAC failed.

查看:265
本文介绍了如何解决viewstate MAC验证失败。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我打开一个,并在10分钟后点击按钮自动得到这种类型的错误。



视图状态MAC验证失败。如果此应用程序由Web场或群集托管,请确保< machinekey> configuration指定相同的validationKey和验证算法。 AutoGenerate无法在群集中使用



描述:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。 

异常详细信息:System.Web.HttpException:viewstate MAC验证失败。如果此应用程序由Web场或群集托管,请确保< machineKey > 配置指定相同的validationKey和验证算法。 AutoGenerate不能在群集中使用。





如何解决我网站上面的错误。请帮我。



谢谢&问候

Santhosh kumar

解决方案

简答:

如果你不需要这种检查 -
页面指令中的
put EnableViewStateMac =false



完整答案:

最有可能你的网站是在Webfarm环境中托管,初始请求由一个服务器提供,但有时,在超时后 - 由另一个服务器说。



有关以下文章的更多详细信息。



http://msdn.microsoft.com/en- us / library / ms998288.aspx [ ^ ]

hi all,

am open the one from and click on button after 10mints automatically i got the this type error.

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.



how to solve above error in my website. please help me.

thank & regards
Santhosh kumar

解决方案

Short answer:
If you don''t need this kind of checking -
in Page directive put EnableViewStateMac = "false"

Full answer:
Most likely your site is hosted on Webfarm environment , initial request is served by one server, but sometimes,saying, after timeout - by another.

More details on article below.

http://msdn.microsoft.com/en-us/library/ms998288.aspx[^]


这篇关于如何解决viewstate MAC验证失败。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆