Sitefinity Validation of viewstate MAC failed

March 15, 2012
This YSOD has been a pain in my ass for months and I just figured it out, so I'm going to post it to the intertubes :)

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.

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.

Source Error:

[No relevant source lines]

Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\db2b3bd9\7adc1fcc\App_Web_e5e088a0-e011-4214-b52b-638207e6bf61_65_basic.aspx.d63928b6.l8sr6pgw.0.cs    Line: 0



For "ME" it has nothing to do with setting machine keys in the webconfig, modifying page nodes, etc etc...it was crazy simple.

The masterpage was defined like this
<form id="form1" action="/" runat="server">

The problem is the "action" attribute...change it to this
<form id="form1" runat="server">

Like magic works again. 

So this being a masterpage issue I think it's asp.net related not anything to do with Sitefinity per-say.


Image Description

Steve McNiven-Scott

Best\Only Blogger on this site. Therefore defacto blogger of the year Award Winner.