title: MessageHandlers vs Filters in asp.net mvc web api project
body: <p>What's the difference between using a MessageHandler vs a Filter to check for an API key in the request header for an MVC web api project.</p>
  
  <p>I see that there is a well outlined example of a MessageHandler for just that purpose in <a href="http://www.asp.net/web-api/overview/working-with-http/http-message-handlers" rel="noreferrer">http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</a></p>
  
  <p>e.g.</p>
  
  <pre><code>GlobalConfiguration.Configuration.MessageHandlers.Add(new ApiKeyHandler());
  </code></pre>
  
  <p>But it looks like I can do the same thing using a filter as well.</p>
  
  <pre><code>GlobalConfiguration.Configuration.Filters.Add(new ApiKeyFilter());
  </code></pre>
  
  <p>Assuming ApiKeyFilter and ApiKeyHandler both just look at the request header and check for an api key, Which way is more efficient?  What's the difference?</p>