title: On initial login on local site getting anti-forgery cookie token error, when try second time it is ok
body: <p>Please bare in mind that I already put a machine key in both of my project's web.config files and I already checked that there is no multiple @Html.AntiForgeryToken() as described <a href="https://stackoverflow.com/questions/15788912/deploying-antiforgerytoken-error">here</a>. I have two projects developed in Asp.Net 4, when deployed locally give me fallowing error on first attempt and there is no problem on second time. I also delete the cookies and browsing history, just to make sure but same result.</p>
  
  <p><strong>Internal Server Error</strong></p>
  
  <blockquote>
    <p>The anti-forgery token could not be decrypted. If this application is
    hosted by a Web Farm or cluster, ensure that all machines are running
    the same version of ASP.NET Web Pages and that the 
    configuration specifies explicit encryption and validation keys.
    AutoGenerate cannot be used in a cluster.</p>
  </blockquote>
  
  <pre><code>System.Web.Mvc.HttpAntiForgeryException (0x80004005): The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the &lt;machineKey&gt; configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.
     at System.Web.Helpers.AntiXsrf.AntiForgeryTokenSerializer.Deserialize(String serializedToken)
     at System.Web.Helpers.AntiXsrf.AntiForgeryTokenStore.GetCookieToken(HttpContextBase httpContext)
     at System.Web.Helpers.AntiXsrf.AntiForgeryWorker.Validate(HttpContextBase httpContext)
     at System.Web.Helpers.AntiForgery.Validate()
     at System.Web.Mvc.ValidateAntiForgeryTokenAttribute.OnAuthorization(AuthorizationContext filterContext)
     at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
     at System.Web.Mvc.Async.AsyncControllerActionInvoker.&lt;&gt;c__DisplayClass1e.&lt;BeginInvokeAction&gt;b__16(AsyncCallback asyncCallback, Object asyncState)
  </code></pre>