I’ve got a route setup which handles "{Object}/{Operation}/{Name}".
Routing works perfectly if I make a request for: http://localhost/Software/Download/Filenameexe (note that no forward slash is needed when no file extension is specified). The request also succeeds when I make the request: http://localhost/Software/Download/Filename.exe/ (note the trailing forward-slash).
But I get a 404 when I make a request for: http://localhost/Software/Download/Filename.exe (this time with a file extension and no trailing forward-slash).
Everything works beautifully when using the built-in Visual Studio 2010 development asp.net web-server, but when I fire the site up in in IIS, it simply throws 404s unless I append the trailing forward-slash.
How can I make the ASP.net routing engine less picky and accept all of the examples?
http://localhost/Software/Download/Filename.exehttp://localhost/Software/Download/Filenameexehttp://localhost/Software/Download/Filename.exe/
Check my answer to this question, I think you’re dealing with the same issue. You may need to specify
runAllManagedModulesForAllRequests="true", or add an HTTP handler for.exefiles, to make sure that ASP.NET processes requests for .exe files. If ASP.NET doesn’t process the files, your route won’t be followed.