title: Prevent static file handler from intercepting filename-like URL
body: <p>In my web application I have a route which looks like this:</p>
  
  <pre class="lang-c# prettyprint-override"><code>routeCollection.MapRoute(
      "AdfsMetadata",                                                // name
      "FederationMetadata/2007-06/FederationMetadata.xml",           // url
      new { controller = "AdfsController", action = "MetaData" });   // defaults
  </code></pre>
  
  <p>The idea behind this route was to work better with Microsoft AD FS server (2.0+) which looks for AD FS metadata at this point when you just specify a host name. With MVC3 all worked fine. But we upgraded the project to MVC4 recently and now the call for this URL results in a 404, the handler mentioned on the error page is <code>StaticFile</code> and the physical path is <code>D:\path\to\my\project\FederationMetadata\2007-06\FederationMetadata.xml</code>. I assume that MVC or ASP.NET "thinks" it must be a request for a static file and looks for the file, but it isn't a file. The data is generated dynamically - that's why I routed the URL to a controller action. The problem is that even the Route Debugger by Phil Haack doesn't work. It's just a 404 with no further information besides that IIS tried to access a physical file which isn't there.</p>
  
  <p>Does anyone have a solution for this? I just want this URL to be routed to a controller action.</p>
  
  <p>P.S.: I'm <em>not 100%</em> sure that the cause was the upgrade to MVC4, it was just a guess because the error occurred at about the same time as the upgrade, and the same route works in another project which is still using MVC3.</p>
  
  <p><em><strong>Edit:</em></strong></p>
  
  <p>I have a custom <code>ControllerFactory</code> which needs the full class name (<code>AdfsController</code> instead of <code>Adfs</code>), so the suffix <code>Controller</code> is correct in this case.</p>