Saturday, July 17, 2010

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster - Asp.net, IIS

Machine Authentication Check, or MAC
Machine authenication check (MAC) is there to ensure that the request received from the computer is same as the computer which response transmitted out.

1. ViewState Timeout:

Cause:
This situation is due to shutting down the application pool work process after some ideal timeout.
Solution:
IIS6:
  1. Open IIS - run inetmgr
  2. View application pools
  3. Locate your web application's application pool
  4. Right click and Select properties
  5. Select performanace tab
  6. Uncheck the ideal timeout [shutdown worker process after being idle for...] option
IIS7
  1. Open IIS - run inetmgr
  2. Click on application pools node
  3. Locate your web application's application pool
  4. Rightclick and select Advanace Settings
  5. Set the Idle Time-out(minutes) property to 0 or I would increate the value to 30 minutes or an hour (60 mins)
For more information please refer this article

2. ViewState Validation Fails

Please refer this article for more information

No comments:

Azure Storage Account Types

Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...