ASP.net MVC4 WebApi route with file-name in it

You could add the following handler to the <handlers> section of your <system.webServer>:

<add 
    name="ManagedDllExtension" 
    path="api/nav/*/*.dll" 
    verb="GET" 
    type="System.Web.Handlers.TransferRequestHandler" 
    preCondition="integratedMode,runtimeVersionv4.0" 
/>

This will make all requests containing .dll be served through the managed pipeline. Also notice how I have limited them only to the GET verb to limit the performance impact.

Leave a Comment