Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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

2 Answers 2

up vote 2 down vote accepted
+150

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.

share|improve this answer
1  
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
1  
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
    
BTW- here's a good post about this topic. scottonwriting.net/sowblog/posts/943.aspx –  squillman Jan 14 '10 at 16:06

When you configuring the IIS, there are two "check that files exists". there's one when you trying to Insert and that must remain unchecked (as your original instruction above suggests). and the second one is in the listing where all type of extensions are listed, you select .aspx and click Edit, there tick the check box. this will make it work. thanks.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.