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