| Author |
Topic Search Topic Options
|
Diep-Vriezer
Senior Member
Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
|
Post Options
Thanks(0)
Quote Reply
Topic: How to make IIS ignore 404 errors? Posted: 19 May 2004 at 7:24pm |
Hey all, I've made some HttpModules, which can handle stuff like this
http://site.local/mypage.myfunnyextention
and handle it like a special kind of shortcut. However, the 'page' doesn't really exists. Now, IIS raises a 404 error whenever it gets called, so is there a way to avoid all IIS errors, since I let ASP.NET handle them?
EDIT: OMG, wait. I forgot to hand over all the extentions to ASP.NET  EDIT2: Which doesn't seems to matter =|
Edited by Diep-Vriezer
|
|
Gone..
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2004 at 7:44pm |
|
IIIRC, you have to ask your host to map the file extension to the asp.net dll.
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
Diep-Vriezer
Senior Member
Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2004 at 7:56pm |
|
I already added a wildcard to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dl l, without the 'Verify that file exists' checkbox checked.
|
|
Gone..
|
 |
dpyers
Senior Member
Joined: 12 May 2003
Status: Offline
Points: 3937
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2004 at 10:02pm |
Sorry, just reread your OP. I assume that if the page does exist, it gets handled by .net ok.
I think IIS checks for the existence of the page before handing it off to aspnet_isapi.dll. If you can set up custom error pages on your host, you could route the 404's to an asp/aspx script for handling.
I don't recall if it was you or Semikolon who use hsphere, but if it was you, you have to be on ver 2.4 to use scripts instead of .htm/.html docs for custom errors.
|
Lead me not into temptation... I know the short cut, follow me.
|
 |
pmormr
Senior Member
Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
|
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2004 at 10:30pm |
as dp suggested... just set up a custom 404 error page that redirected to your ASP.NET handling page
|
|
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2004 at 2:55am |
|
Hmm strange, I use a similar system and it works perfect, I think your mapping to aspnet_isapi.dll wrong.
|
 |
Diep-Vriezer
Senior Member
Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2004 at 10:03am |
|
Fact is that I do not route stuff to an aspx page, but handle it with a HttpModule. I'm going to rewrite all the things, see if it works then.
|
|
Gone..
|
 |
Diep-Vriezer
Senior Member
Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
|
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2004 at 11:12am |
Alright, at least IIS leaves the handling to ASP.NET, FrontPage extentions didn't work if you handled over all extentions to ASP.NET, so I got rid of those useless things.
Anyways, now ASP.NET raises a 404 error, and the HttpModule doesn't seem to do anything.
|
|
Gone..
|
 |