Danish Habib

Danish Habib

  • NA
  • 694
  • 245.8k

How to add a machine key

Dec 8 2014 6:41 AM
Dear all I am getting an error on my web application which  is hosted on some hosting server not on IIS , I am using the view state as well as the session object in my application some one share that add a machine key in your web.config to solve that issue but i do not know to get that machine key which suits my web application .below is the error which  i am getting  randomly ...please respond me 
""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.

See http://go.microsoft.com/fwlink/?LinkID=314055 for more information.""




Kind regards
Danish Habib