“Validation of viewstate MAC failed. If this application is hosted by a Web Far…”

前端 未结 7 798
悲&欢浪女
悲&欢浪女 2021-01-11 10:07

i am facing the dreaded:

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the

7条回答
  •  醉梦人生
    2021-01-11 11:03

    I am using VS 2010 against a Windows Web Server 2008 and what I eventually found was that I had two keys set for the same service in the appSettings section of webconfig. I went to IIS and checked the Application Settings on the virtual directory and got an error, fixed it in the WebConfig and the problem resolved. I did create a machine key but that did not fix the problem. Nor did the

    pages (...) validateRequest="false" enableEventValidation="false" enableViewStateMac="false" viewStateEncryptionMode ="Never"/

    Settings. FWIW ...

提交回复
热议问题