chrisg

viewstate MAC failing

If you have a K2 farm running workspace you may run into this issue.

The main page for workspace may load fine as do all the initial page loads for the process overview reports, but as soon as you drill down into a process instance

You will get this ASPX page error:

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.

Description:

An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:

System.Web.HttpException: 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.

If you stop using the NLB functionality by running the request directly to the servers this issue won't happen and all works well.

From what we have gathered this is a bug in .net2 that requires you to add   

<pages enableViewStateMac="false"/>

to the systemweb node of your web.config for each workspace server.

The pages node already exist in the webconfig so just add "enableViewStateMac="false"" to it so that it looks like this:

<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false"/>

Big thanks to Barry and Gale for figuring this all out.

 

Published Monday, May 19, 2008 5:07 PM by chrisg

Comments

No Comments
Anonymous comments are disabled

About chrisg

I am responsible for community development for SourceCode. I have been in technology for over 14 years mainly in infrastructure and security. I absolutely love technology especially new stuff and gadgets.