ASP.NET “Validation of viewstate MAC failed” error
August 19th, 2007 — ¥ong¥s
Online project management, task software, and free collaboration workspace: AJAXWorkspace
AJAXWorkspace is a free online workspace that offers task tracking software, team collaboration, online calendar, document sharing, and file management for project management and teamwork. |
I came across this error:
“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.”
This happen due to the application pool’s “IdleTimeout” set to a lower value compare to your session timeout value. Let say your session timeout set to 20 mins but your app pool idle time out set to 10 mins. After 10 mins, app pool sshutdown the worker process. If you do not handle the session expire well, you may get this error. You have to either hanlde via the code or just set the Idle Timeout setting to a greater value compare to your session timeout value.









