# IIS6 Wildcard Mapping to ASP.NET - no file extension results in IIS 404

I'm trying to perform what I understand to be a relatively simple task. I'd like to remove the extensions from the URLs on my website. I have the proper set up in my application to handle and rewrite the URLs - the trouble is I can't get past IIS to actually get to my application without the extensions.

The details:

I'm running IIS6 on Windows Server 2003. I've gone into the web site for my application, gone to the home directory tab, clicked "Configuration" and added a wildcard map to the following file:

c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll

Which I verified is the same as what is used above in the application extensions portion by .ascx, etc.

If I navigate to http://mywebsite.com/Blogs the result is as follows:

HTTP/1.1 404 Not Found
Content-Length: 1635
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Date: Thu, 14 Jan 2010 15:04:49 GMT


Which seems to be a standard IIS 404 message. If I navigate to http://mywebsite.com/Blogs.aspx I get my ASP.NET app....

How can I troubleshoot this? I feel like I've double checked everything a dozen times but to no avail. I must be missing something obvious.

Update: Here are the exact instructions given by the asp.net url rewriter that I'm using:

IIS 6.0 - Windows 2003 Server

• open property page for website / virtual directory.
• click the 'home directory' tab
• click the 'configuration' button, select the 'mappings' tab
• click 'insert' next to the 'Wildcard application maps' section
• browse to the aspnet_isapi.dll (normally at c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll)
• Ensure that 'check that file exists' is unchecked
• Click OK, OK, OK to close and apply changes

Update 2:

I have yet to find a resolution for this. The application does not seem to be receiving the request from IIS, any further ideas?

-
You mention that you do have a custom URL/route handler in your app. Is that one that you wrote or is it a third party library? –  squillman Jan 18 '10 at 14:48
It is a third party handler, more information on that can be found here: ifinity.com.au/Products/Support_Forums/forumid/8/threadid/3847/…. I've been troubleshooting it from that end as well, but at this point it still appears that the request is not actually getting to the application at all. –  Ian Robinson Jan 19 '10 at 13:07
Ah, so this is a DotNetNuke site then? –  squillman Jan 19 '10 at 15:15
If so, which version of DNN are you using? I'll see if I can replicate your environment and help come up with something. –  squillman Jan 19 '10 at 15:34
Yep. This particular site is DNN 4.8.4. I'm actually setting up a new 4.8.4 site now on my personal server (windows server 2003, IIS 6) to see if I can replicate the issue. I got it working in my dev environment (DNN 5 / IIS 7) in no time. –  Ian Robinson Jan 19 '10 at 16:13

The 404 is because ASP.NET is not finding a file called "Blogs". It's just saying that all files should be processed (interpreted) by aspnet_isapi.dll

You will need to put something (a custom routing engine or a URL rewriter) in place that maps URL's to files. Try Helicon's ISAPI Rewrite or Ionic's Isapi Rewrite.

-
Hm, my understanding was - as long as I don't have 'verify that file exists' checked in the wildcard settings - that the request would be forwarded to my asp.net application. Is that not the case? –  Ian Robinson Jan 14 '10 at 15:29
The request, yes. But it still needs to know how to find the file. Unless you have a custom handler that knows how to take /Blogs and turn it into /Blogs.aspx it's not going to work. ASP.NET doesn't know how to do that by default. –  squillman Jan 14 '10 at 15:51
OK, I do have a handler set up on the application itself that should be handling requests that it receives and mapping to the appropriate page. So, are you saying that the request IS actually getting forwarded to my application and the problem may not actually be in IIS? I can look into the configuration of the httphandler based product that is being used further if that is the case. –  Ian Robinson Jan 14 '10 at 15:58
Yes, that's where I'd look. Confirm that your app's handler is actually getting the request from IIS. So yeah, the text in my original answer is not quite right, going back and rereading it. I'll fix that. –  squillman Jan 14 '10 at 16:04