title: Reading Form Data in ActionFilterAttribute
body: <p>I created an ActionFilterAttribute for my web api in order to authorize people. Getting accessToken by RequestUri is okay, however i want to send it in form data. While reading Request.Content in onActionExecuting method of ActionFilterAttribute, server always has an empty result. How can i solve this problem? The code is as like as below:</p>
  
  <pre><code>    public class RequireAuthorization : ActionFilterAttribute
  {
  
      public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext actionContext)
      {
          actionContext.Request.Content.ReadAsStringAsync().ContinueWith((t) =&gt;
          {
              try
              {
                  //query will result in empty string
                  string query = t.Result;
  
                  string UserID = HttpUtility.ParseQueryString(query).Get("UserID");
                  string accessToken = HttpUtility.ParseQueryString(query).Get("AccessToken");
  
                  UserRepository repository = new UserRepository();
                  repository.IsTokenValid(Convert.ToInt32(UserID), accessToken);
              }
              catch (Exception ex)
              {
                  var response = new HttpResponseMessage
                  {
                      Content =
                          new StringContent("This token is not valid, please refresh token or obtain valid token!"),
                      StatusCode = HttpStatusCode.Unauthorized
                  };
  
                  throw new HttpResponseException(response);
              }
          });
  
  
          base.OnActionExecuting(actionContext);
      }
  }
  </code></pre>