title: ASP MVC 2 handlers for extensionless urls in IIS 7.5 not working
body: <p>I have a project with a HttpHandler that's supposed to execute when an extensionless url like this <code>localhost/foo/bar</code> is requested. I got this properly working on a local Visual Studio development server (by using <code>&lt;httpHandlers&gt;</code> in <code>&lt;system.web&gt;</code> instead of <code>&lt;system.webServer&gt;&lt;handlers&gt;</code>) but this functionality doesn't work when deployed to IIS 7.5 (Standard 404 error: <a href="http://i.imgur.com/YuNjT.jpg" rel="nofollow">http://i.imgur.com/YuNjT.jpg</a>). This issue is not restricted to extensionless URLs (I might add any extension at the end and the issue remains) but my desired functionality is to use extensionless url in this scenario. I googled some information that extensionless URLs may cause some issues that's why I mention it here. The AppPool is set to Integrated. I did aspnet_regiis.exe -i. I have Http Redirection feature installed on the IIS server. Here's my handlers config:</p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
      &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
      &lt;handlers&gt;
          &lt;add name="FileDownloadHandler" path="/Home/Files/*" verb="*" type="MvcApplication1.FileDownloadHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" /&gt;
      &lt;/handlers&gt;
      &lt;directoryBrowse enabled="true" /&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>And here's my routing setup:</p>
  
  <pre><code>routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  routes.IgnoreRoute("home/files/{*pathInfo}");
  
  routes.MapRoute(
      "Default",
      "{controller}/{action}/{id}",
      new { controller = "Home", action = "Index", id = UrlParameter.Optional }
  );
  </code></pre>
  
  <p>I'm guessing the code is fine but something's off with my IIS configuration. Can anyone guide me in the right direction? I've googled for days now and I couldn't find a solution that helped me. Here's a sample project (works on local VS dev server but not on my IIS):
  <a href="http://mapman.pl/MvcApplication1.zip" rel="nofollow">http://mapman.pl/MvcApplication1.zip</a></p>
  
  <p>When you build (and deploy to your local IIS) the above solution try requesting an url like this: <code>http://localhost/MvcApplication1/Home/Files/foobar</code></p>
  
  <p>Thanks in advance,
  Bartek</p>