title: How to get Request Querystring values?
body: <p>My api client code sends an authentication token in the querystring like:</p>
  
  <pre><code>www.example.com/api/user/get/123?auth_token=ABC123
  </code></pre>
  
  <p>I'm using Mvc Web api controller, and I have a filter that checks if the auth_token is valid or not, but I'm not sure how to access the request querystring values.</p>
  
  <p>This is what I am doing now but it is obviously wrong:</p>
  
  <p>The below snippet is inside of my filter that inherits from:</p>
  
  <p><strong>ActionFilterAttribute</strong></p>
  
  <pre><code>public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext actionContext)
  {
         base.OnActionExecuting(actionContext);
  
         if (actionContext.Request.Properties.ContainsKey("auth_token") &amp;&amp;
            actionContext.Request.Properties["auth_token"].ToString() == "ABC123")
         {
           ...
         }
  }
  </code></pre>