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
stack overflow 和 asp.net 论坛也有同样的问题,但任何解决方法都没有解决我的问题。
当我将数据从一个 asp.net 页面发布到不同网站(托管在 SSL 中)的另一个页面时,出现上述错误。我尝试在两个应用程序中添加相同的机器 key ,并尝试提供如下所示的页面属性
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false" >
<machineKey validationKey="06E158563F2028028595BDF5943CAE28A95CEA4F" decryptionKey="8DB0D34A423D3C714E548AB4BA80040C789F4E01B9AAE6D27E6363E5DA154702" validation="SHA1" decryption="AES" />
但我仍然遇到同样的错误。请注意,我使用的是 VS 2013、最新的 ASP.net 版本和在 SSL 中托管的应用程序。
请提供解决方案。
最佳答案
尝试放入 Page 指令:
<%@ Page
EnableViewStateMac="false" EnableEventValidation="false" ViewStateEncryptionMode="Never"
%>
关于asp.net - viewstate MAC 验证失败。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33707439/