|
Home > Archive > IIS Server Security > May 2005 > Custom Errors
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Andy Smith 2005-05-20, 6:03 pm |
| Hi there,
Is it possilbe to redirect error pages (401, 404, etc), to a custom page
using ASP/VBScript.
I'd rather not use the custom errors tab in IIS as we have more than one web
site running on the IIS server.
Thanks very much/...
| |
| Andy Smith 2005-05-20, 6:03 pm |
| Forgot to say that I know you can define different error pages per virtual
directory, but would prefer, if possible, to do as asked above!!
Thanks/...
"Andy Smith" wrote:
> Hi there,
>
> Is it possilbe to redirect error pages (401, 404, etc), to a custom page
> using ASP/VBScript.
>
> I'd rather not use the custom errors tab in IIS as we have more than one web
> site running on the IIS server.
>
> Thanks very much/...
| |
| Ken Schaefer 2005-05-21, 7:51 am |
| Hi,
This is not possible (AFAIK) using ASP. Either change the settings via IIS
Manager, use ISAPI Filter, or convert to ASP.NET (where you can specify
changes via web.config).
If you have access to the server, you can script the necessary changes
(using ADSI) to the metabase, so I don't really understand the argument
about having "lots of sites" as an impediment to doing this.
Cheers
Ken
--
Blog: www.adopenstatic.com/cs/blogs/ken/
Web: www.adopenstatic.com
"Andy Smith" <AndySmith@discussions.microsoft.com> wrote in message
news:507F4C28-E9CA-4538-A63C-E4E02E0E6EA6@microsoft.com...
: Forgot to say that I know you can define different error pages per virtual
: directory, but would prefer, if possible, to do as asked above!!
:
: Thanks/...
:
: "Andy Smith" wrote:
:
: > Hi there,
: >
: > Is it possilbe to redirect error pages (401, 404, etc), to a custom page
: > using ASP/VBScript.
: >
: > I'd rather not use the custom errors tab in IIS as we have more than one
web
: > site running on the IIS server.
: >
: > Thanks very much/...
| |
| David Wang [Msft] 2005-05-21, 8:47 pm |
| This is how to "redirect" error pages to custom page handlers.
Use the custom error tab in IIS at the global (or website) level (so that
its settings inherit down to child nodes [unless you specifically override
them), and set up each custom error in the tab to directly call your own
custom page via a single URL.
i.e. You have a custom error page located at:
/bin/CustomErrors.asp
You change IIS custom errors at the global level to map all custom error
handlers to URL of /bin/CustomErrors.asp
Now, every single error that happens on IIS will be routed through
/bin/CustomErrors.asp. Except for the 401 errors.
--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Andy Smith" <AndySmith@discussions.microsoft.com> wrote in message
news:05EB6D4B-22E1-4B64-B8E4-300D591E1534@microsoft.com...
Hi there,
Is it possilbe to redirect error pages (401, 404, etc), to a custom page
using ASP/VBScript.
I'd rather not use the custom errors tab in IIS as we have more than one web
site running on the IIS server.
Thanks very much/...
|
|
|
|
|