Validation of viewstate MAC failed. while submitting a form using javascript
I am getting the below error when submitting an asp.net page using javascript. I have set
EnableEventValidation="false"
ViewStateEncryptionMode="Never"
EnableViewState="false"
EnableViewStateMac="false"
in my page directive
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey>
configuration spec开发者_JAVA百科ifies the same validationKey
and validation algorithm. AutoGenerate cannot be used in a cluster.
You are getting the error because your viewstate times out, a security feature. I wouldn't play around with the machine key, have you set the enableViewStateMac="False" right on your .aspx page?
I occasionally get this error with sites I have hosted with GoDaddy. I do one or all of the following:
- Recompile and reupload your binary file
- Call the hosting company and tell them what's going on. Sometimes it's an issue on their end
- Wait it out. Sometimes it will just go away. But still call your hosting company.
Also, see this question.
精彩评论