title: The anti-forgery token could not be decrypted
body: <p>I have a form:</p>
  
  <pre><code>@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl })) {
  @Html.AntiForgeryToken()
  @Html.ValidationSummary()...
  </code></pre>
  
  <p>and action:</p>
  
  <pre><code>[HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public ActionResult Login(LoginModel model, string returnUrl, string City)
  {
  }
  </code></pre>
  
  <p>occasionally (once a week), I get the error: </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>
  
  <p>i try add to webconfig:</p>
  
  <pre><code>&lt;machineKey validationKey="AutoGenerate,IsolateApps"  
      decryptionKey="AutoGenerate,IsolateApps" /&gt;
  </code></pre>
  
  <p>but the error still appears occasionally</p>
  
  <p>I noticed this error occurs, for example when a person came from one computer and then trying another computer</p>
  
  <p>Or sometimes an auto value set with incorrect data type like bool to integer to the form field by any jQuery code please also check it. </p>