Search code examples
c#asp.neturl-routinghttp-status-code-404webforms-routing

URL Routing and IIS6. How can I test it?


I can't seem to understand how I can find out what is erroring out when I implement URL Routing on IIS6 and Webforms.

I continue to get 404 errors when I try to access a route.

I add the ISAPI module as described here: http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/

SO that way ASP.Net handles all the requests, but THEN I get a 404 error just accessing the site.

Is there a way to tell if the URL Routing engine is even getting the request?


UPDATE: For the 64-bit version of Windows (which I failed to mention) the correct DLL is:

C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll

If you're not sure which version (or you want to be sure you get the right path) just copy the value that is in the Executable Path of the “aspx” extension in the ListBox above the WildCard Mapping box.


Solution

  • Here are the exact steps we took to fix this problem, although you may have already done this based on your post. On our development boxes, it worked fine, but not on the Windows 2003 server with IIS6.

    1. In IIS, right click on the Virtual Directory, select Properties.
    2. Under the Directory tab, click the Configuration... button.
    3. Under the Mappings tab, under the Wildcard application maps (order of implementation): click the Insert... button.
    4. Browse and select C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll for 32-bit or C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727 for 64-bit, leave Verify that the file exists unchecked.
    5. Move Up aspnet_isapi.dll to the top of the list.
    6. Click Ok, Ok, and try it. Try recycling the application pool if you don't see it work.

    Can you confirm this is a server, not your dev box? Can you confirm that the server has .Net 3.5 SP1?