title: How to set the AntiForgeryToken cookie path
body: <p>The former <a href="https://msdn.microsoft.com/en-us/library/dd492243%28v=vs.118%29.aspx" rel="noreferrer">HtmlHelper.AntiForgeryToken</a> method which allows one to override the <code>string path</code> is deprecated.</p>
  
  <pre><code>[ObsoleteAttribute("This method is deprecated. Use the AntiForgeryToken() method instead. To specify a custom domain for the generated cookie, use the &lt;httpCookies&gt; configuration element. To specify custom data to be embedded within the token, use the static AntiForgeryConfig.AdditionalDataProvider property.", 
      true)]
  public MvcHtmlString AntiForgeryToken(
      string salt,
      string domain,
      string path
  )
  </code></pre>
  
  <p>Tells you to use <code>&lt;httpCookies&gt;</code>.  BUT <a href="https://msdn.microsoft.com/library/ms228262(v=vs.100).aspx" rel="noreferrer">httpCookies Element</a> does not have a setting for PATH. </p>
  
  <p>Is this an oversight in the deprecation of this method?  What is the best way to overwrite this cookie path? (manually?)  Running website in a virtual application is not implicitly adding the application path to the __RequestVeririfcation cookie.</p>