•   30 March 2008 1:04 am
  •  

Question: I get this error and I am not sure if this error is caused by me missing something from the DB or what. I have a login-in. When I do something about 3 to 5mins later, I get kicked off and become logged out. I used the prebuild asp.net login. So thats why I am not sure if I am missing a data column from my asp.net membership tables or if this is being caused from something else.

Server Error in '/' Application.
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.


Answer: This is a common error found mainly using our clustered hosting environment basically because you are hopping web servers. To resolve this you must use a static machineKey from within your web.config file.

To generate a machineKey file please see: http://www.eggheadcafe.com/articles/GenerateMachineKey/GenerateMachineKey.aspx

This occurs if the site gets recycled, a new MAC is generated which doesn't match the old MAC. Then you'll see this error message.

Comments

  Add Comment

Confirm Submission

Please enter the text from the image in the box provided; this helps us to prevent spam.