title: ASP.NET MVC Validation of ViewState MAC failed
body: <p>After publishing a new build of my ASP.NET MVC web application, I often see this exception thrown when browsing to the site:</p>
  
  <p>System.Web.Mvc.HttpAntiForgeryException: A required anti-forgery token was not supplied or was invalid. ---> System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that  configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. ---> System.Web.UI.ViewStateException: Invalid viewstate.</p>
  
  <p>This exception will continue to occur on each page I visit in my web application until I close out of Firefox.  After reopening Firefox, the site works perfectly.  Any idea what's going on?</p>
  
  <p>Additional notes:</p>
  
  <ol>
  <li>I am not using any ASP.NET web controls (there are no instances of runat="server" in my application)</li>
  <li>If I take out the &lt;%= Html.AntiForgeryToken %> from my pages, this problem seems to go away</li>
  </ol>