Forum Moderators: open

Message Too Old, No Replies

Setting up custom error app

my idea for a custom error script

         

remog

1:56 am on Apr 3, 2003 (gmt 0)

10+ Year Member



Here is an intersting idea:

Is it possible to set up in IIS a script that detects what error the user causes (be it: 404-1 or 500) and displays the correct error message.

I dont want to use ASP for this, although suggestions would be cool.

thanks

duckhunter

5:13 am on Apr 4, 2003 (gmt 0)

10+ Year Member



In IIS Manager, right click on the Website you want to affect and then click Properties.

Click on the Custom Errors Tab and you will see each error listed with a resulting URL or File to trigger if the particular error is trapped. You can change these URLs to go to a custom page.

remog

3:51 am on Apr 5, 2003 (gmt 0)

10+ Year Member



thanks, but I already know that much. Let me clarify, instead of having to make a different page for each error, (mainly because I am lazy) I would like to have 1 script that detects the error being generated and displayes a script-generated page based on the error.

Huang_A

7:35 pm on Apr 5, 2003 (gmt 0)

10+ Year Member



well, how about CGI and PHP? lol... erm... I don't think JavaSscript and VBScript can pass veriables from pages to pages, so your best bet would be a better scripting language like ASP or PHP... You can get your page configured to go to "Errors.asp?Error=###" where ### is the error number, and have a large case statement to handle all the errors... Otherwise I don't think there are any other ways to do it... ofcourse, I'm still a newbie... so maybe I missed something that's already out there...

duckhunter

11:41 pm on Apr 7, 2003 (gmt 0)

10+ Year Member



Check Server.GetLastError in VBScript