title: asp .net view state option in web.config
body: <p>I have an asp .net application. I had the responsibility to deploy this code in our development servers. I deployed the code using the package that was provided and the installation was successful. But when I tried to lauch the login page, I am getting server error with the following message</p>
  
  <blockquote>
    <p>Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that &lt;machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.</p>
  </blockquote>
  
  <p>If I set enableviewstate and enableviewstatemac = false then I am able to run the code and see all the pages. I know about view state but dont have in depth knowledge on this area. Can someone tell me how I can enable view state and still have my application run without compromising any security related issues? I dont have in depth knowledge on using the validation key in conjunction with view state. </p>
  
  <p>Also this application is currently in production and I was responsible to maintain from now on. So I hope the package given to me should work perfectly as it works in production without removing the view state in web.config. Any help would be appreciated</p>