“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.“
Below is the code I was using for form submission.
I had written above script on submit button. After searching I found the reason for that. In ASP.NET, there is a specific method “__dopostback()” which allows user to submit the form to server(postback). Each time form is submitted with “post” method, CLR checks for valid viewstate so that there can not be any type of injection.
To solve this problem you have set “name” attribute of viewstate before submitting. The code is shown below.
Happy Programming !