05-21-2002, 10:36 AM
I have searched through the avaliable posts on this forum, and unfortunetaly there is nothing that helps with my situation.
My scenario is that I need to find the HTTP Error number, i.e. 400, then I can specify a SQL query that will select certain data from a database for a custom error page. The thing is I need to be able to do this in ASP and not in my usual VB!!
Any help would be gratefully received....
05-21-2002, 10:46 AM
You have to configure this in IIS. It is on the Custom Errors tab of
the web site properties.
05-21-2002, 10:57 AM
I have gone through that, and I have looked at using seperate pages for each error message, but what I want to use is just one page, with code in there that will extract data from a SQL server db.
Will I have to configure this in the properties or not?
05-21-2002, 11:04 AM
I have managed to specific one file, using the "URL" option in the "Custom Errors" option within "Properties", however, it is the code within that one ASP document that I need help with.
I just need to know, whether it is a ServerVariable, or not and is not, what it is that will display the Error Code.....
05-21-2002, 11:05 AM
I understand now. There is no guarantee this will work, but you
Set ASPErr = Server.GetLastError
If ASPErr.ASPCode = 400 Then...
The ASP book I have says this is supposed to work, but many
times doesn't. I hope it does for you.
05-21-2002, 11:08 AM
Cheers Thinker, "me old china"! I shall try it and hopefully it will work!! I shall let you know....