title: AntiForgery Exception: A required anti-forgery token was not supplied or was invalid
body: <p>I have an MVC2 application. I am trying to implement AntiForgeryToken helper to prevent CSRF attacks. </p>
  
  <p>I am implementing this using Steve Sanderson's blog: <a href="http://blog.stevensanderson.com/2008/09/01/prevent-cross-site-request-forgery-csrf-using-aspnet-mvcs-antiforgerytoken-helper/" rel="nofollow">http://blog.stevensanderson.com/2008/09/01/prevent-cross-site-request-forgery-csrf-using-aspnet-mvcs-antiforgerytoken-helper/</a></p>
  
  <p>When I implement this in a NEW MVC2 project it works. But the same code when I put it in my REAL application, it ALWAYS throws this exception: 
  A required anti-forgery token was not supplied or was invalid.</p>
  
  <p>Here is my Controller code:</p>
  
  <pre><code>[ValidateAntiForgeryToken]
  public ActionResult SubmitUpdate()
  {
  
      // Something goes here
      return View();
  }
  </code></pre>
  
  <p>Code in View:</p>
  
  <pre><code>&lt;% using (Html.BeginForm("SubmitUpdate", "Test"))
     {%&gt;
     &lt;%= Html.AntiForgeryToken() %&gt;
         &lt;input type="submit" value="Submit" /&gt;
  &lt;% } %&gt;
  </code></pre>
  
  <p>There is no difference in the two apps except that the real application uses ADFS for autentication. What am I missing? Any help will be highly appreciated. Thanks!</p>