We have problem with users getting invalid view state exceptions in our web farm setup (ASP.NE.

In the machine.config we have this setting:

<section name="machineKey" type="System.Web.Configuration.MachineKeySection, System.Web, Version=, Culture=neutral, PublicKeyToken=b04f6f7f22b50a3c" allowDefinition="MachineToApplication"/>

I've read that it should look like this:

<machineKey validationKey='A130E240DF1C49E2764EF8A86CEDCBB11274E5298A130CA08B90EED016C0
decryptionKey='2CC37FFA8D14925B9CBCC0E3B1506F35066FEF33FEB4ADC8' validation='SHA1'/>

Does the former do the same thing? Or can this be the answer to our View State problems?

The servers are running .NET 3.5 and IIS 7.0 (or maybe IIS 6.0).

1 Answer 1


Yes, this could be your problem. If you have a server farm (i.e. more than one web server) you need to ensure that the machinekey settings are the same on all servers.

If you do not do this then you can end up with invalid view state errors if a request is generated on Server A and then posted back to Server B.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.