Viewstate MAC失败消息 [英] Viewstate MAC failure message

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

问题描述

托管网站后,一次访问两个或多个成员时,出现此错误:

After hosting a web site, when accessing two or more members at a time, I get this 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. 


推荐答案

您可以通过在页面指令中添加EnableViewStateMac="false"来关闭此验证.
真正的问题是什么导致了错误,而您没有提供太多信息.
You can turn off this validation by adding EnableViewStateMac="false" to your page directive.
The real question is what''s causing the error and you didn''t provide much info.


如果此应用程序由Web Farm或群集托管,请确保< machinekey>配置指定相同的validationKey和验证算法. AutoGenerate无法在群集中使用."我们查看了该错误,并意识到我们需要创建一个静态机器密钥并将其添加到两个IIS7 Web服务器的web.config中,以解决此问题. > 在web.config中添加以下代码.

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" . We looked at the error and realised that we need to create a static machinekey and add it into the web.config of both our IIS7 web servers to fix the issue.
Add following code in web.config.

<machinekey validationkey="AutoGenerate,IsolateApps" decryptionkey="AutoGenerate,IsolateApps">
						validation="SHA1" decryption="Auto" /></machinekey>


这篇关于Viewstate MAC失败消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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