ASP.NET - Validationof viewstate MAC failed,error raised when session stimed out

Asked By Deepak Amemane on 08-Mar-13 06:21 AM

We are receiving the following error whenever session is timed out.

Validationof 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 acluster.

We came to know this error occurs when redirecting to the login page .

Application is hosted on IIS  and only one application is running on the server. No webfarm is running on the server.

Server has latest ASP.NET 3.5 framework SP1 running in the server.


Please be aware that we cannot use enableViewStateMac="false" as it compromises security on the webpage as we are facing this issue on a banking application.

Every help would be appreciated. 

Deepak A P