2

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.exe
  • http://localhost/Software/Download/Filenameexe
  • http://localhost/Software/Download/Filename.exe/
tereško
  • 58,060
  • 25
  • 98
  • 150
NTDLS
  • 4,757
  • 4
  • 44
  • 70

1 Answers1

5

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 .exe files, 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.

Community
  • 1
  • 1
rsbarro
  • 27,021
  • 9
  • 71
  • 75