title: Adding HttpHandler to MVC application
body: <p>I have an MVC4 application to which I added an <code>HttpHandler</code>:</p>
  
  <pre><code>&lt;system.web&gt;
      ...
      &lt;httpHandlers&gt;
          &lt;add path="Files" verb="*" type="MyHttpHandler" /&gt;
      &lt;/httpHandlers&gt;
  &lt;/system.web&gt;
  </code></pre>
  
  <p>I also ignored the relevant path in <code>RegisterRoutes</code> so that the requests to "Files" are not handled by MVC:</p>
  
  <pre><code>routes.IgnoreRoute("Files/{*pathInfo}");
  </code></pre>
  
  <p>The problem is that the <code>MyHttpHandler</code> is invoked only for requests to "Files", not for any of its children or sub-folders. </p>
  
  <p>I've tried using the <code>&lt;location&gt;</code> element, but getting that to work means that you will be hard coding the application's virtual path in the "path" attribute (e.g., <code>&lt;location path='MyApp\Files'&gt;</code>).</p>
  
  <p>What is the correct method to use to allow all requests for "Files" and any of its sub-folders (and sub-folders of those folder, etc) to get routed to <code>MyHttpHandler</code>?</p>