views:

528

answers:

1

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.

+2  A: 

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?

James Lawruk
I didn't try recycling the app pool. I just installed .Net 3.5 SP1 but I don't know where I can "confirm" that.
Atømix
Yes, this is a server. not the dev box. I recreated the site from scratch in IIS and still the same thing. I have to do this on two servers, because they're load balanced and IIS Changes don't replicate. As SOON as I add teh aspnet_isapi.dll file, everything 404s. Before that, I can access aspx files.
Atømix
YAY! I figured it out! I had to use the 64-bit version of the DLL! Your answer is correct for 32-bit so I'll mark it correct. But if you could add the 64-bit DLL here: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dllto step 4, it would be good.
Atømix
Very cool! I added your 64-bit variation. Thanks.
James Lawruk