Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - How to make IIS ignore 404 errors?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to make IIS ignore 404 errors?

 Post Reply Post Reply Page  123>
Author
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post 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..
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post 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..
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post 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..
Back to Top
Diep-Vriezer View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 August 2003
Location: Netherlands
Status: Offline
Points: 831
Post Options Post Options   Thanks (0) Thanks(0)   Quote Diep-Vriezer Quote  Post ReplyReply Direct Link To This Post 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..
Back to Top
 Post Reply Post Reply Page  123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.