title: The name 'AntiForgery' does not exist in the current context
body: <p>I am Trying to implement Antifrogery Token in my Web Api but getting following error:</p>
  
  <p>The name 'AntiForgery' does not exist in the current context.</p>
  
  <p>Here is My code:</p>
  
  <pre><code>using System.Threading;
  using System.Threading.Tasks;
  using System.Web.Http.Controllers;
  using System.Web.Http.Filters;
  namespace MyAPI
  {
  [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
  public sealed class ValidateAntiForgeryTokenAttribute: FilterAttribute
  {
  
      public Task&lt;HttpResponseMessage&gt; ExecuteAuthorizationFilterAsync(HttpActionContext actionContext, CancellationToken cancellationToken, Func&lt;Task&lt;HttpResponseMessage&gt;&gt; continuation)
      {
          try
          {
              string cookieToken = "";
              string formToken = "";
              //I am getting error on the line written below for  "AntiForgery":
              AntiForgery.Validate(cookieToken, formToken);
          }
          catch
          {
              actionContext.Response = new HttpResponseMessage
              {
                  StatusCode = HttpStatusCode.Forbidden,
                  RequestMessage = actionContext.ControllerContext.Request
              };
              return FromResult(actionContext.Response);
          }
          return continuation();
      }
  
      private Task&lt;HttpResponseMessage&gt; FromResult(HttpResponseMessage result)
      {
          var source = new TaskCompletionSource&lt;HttpResponseMessage&gt;();
          source.SetResult(result);
          return source.Task;
      }
   }
  }
  </code></pre>