title: ASP.NET MVC path with file extension
body: <p>In ASP.NET MVC5 using attribute-based routing, I want to handle URLs with file extensions, eg</p>
  
  <pre><code>~/javascript/security.js
  </code></pre>
  
  <p>Here's an example controller action method:</p>
  
  <pre><code>    [Route("javascript/security.js")]
      public ActionResult AngularSecurityModule(string clientId)
      {
          return View(new
                      {
                          ClientId = clientId
                      });
      }
  </code></pre>
  
  <p>However, this gives me an HTTP 404 - Not Found.</p>
  
  <p>I'd prefer to not use runAllManagedModulesForAllRequests (eg</p>
  
  <pre><code>&lt;system.webServer&gt;
    &lt;modules runAllManagedModulesForAllRequests="true" /&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>) since that will hurt the perf of other static files in the web app.</p>