Reputation: 9966
I have setup url routing in my ASP.NET 4 project, which works perfectly offline. However, now when it is online - every link which has been setup by url routing doesn't work.
Basically a link like this: http://www.domain.com/test/bla
Will always return a 404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Oh well, I decided to try to fix it. I found the following tips which did not work (and can't seem to find any other):
1. Have the following code in the web.config:
<modules runAllManagedModulesForAllRequests="true">
2. Following this article: http://www.britishdeveloper.co.uk/2010/06/dont-use-modules-runallmanagedmodulesfo.html. No succes.
3. Changing my servers pipeline mode to integrated.
Still, 404 errors.
Any ideas?
Upvotes: 1
Views: 2961
Reputation: 41757
Ensure that the "verify file exists" setting in IIS is not checked (I believe it is by default), where this setting lives depends on whether you're hosted by IIS6 (or less) or IIS7 (or higher).
IIS6 - IIS Manager -> Web Site Properties -> Configuration -> Mappings -> Verify file exists checkbox
Upvotes: 1