Custom Errors isn't as easy as you think, and here's why:
The custom error pages, including 404, is returned ONLY if IIS itself served
the request. If the request is handled by a CGI/ISAPI or some ScriptMap,
they are responsible for the response and control what they send for custom
errors -- they may not even use the custom errors configured in IIS and
there is nothing that IIS can do about it.
For example, .html is usually handled by IIS (unless you've scriptmapped
..html or .*). Thus, 404 access to those URLs return IIS's custom errors for
404. .aspx is handled by ASP.Net, thus 404 access to those URLs do not
return IIS's custom errors.
For the 404 case, there is one special case -- if you check the "Check if
File Exists" option for all the ScriptMaps and have it inherit to the
appropriate websites, IIS will do the file-check for all requests prior to
invoking the ScriptMap-- and any 404 will return the IIS custom error page,
not the ScriptMap's.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"G_R" <galaxyrythm DeleteThis @hotmail.com> wrote in message
news:eiG7g$FsDHA.4088@TK2MSFTNGP11.phx.gbl...
Having problems trying to get a custom 404 error page to show up in IIS5 on
a Win2K Srv box.
I have virtual server and have configured it to point to a custom 404 html
page.
It works in the following conditions with my IE 6.0 SP1 browser:
When I browse to a non-existant page (ie
http://123.abc.com/bad-page.html)
It doesn't work in the following conditions:
When I browse to a non-existant directory (ie
http://123.abc.com/bad-dir/)
I get the standard, default 404 error page instead of my custom one.
Where do I need to go to have the custom 404 page used in all conditions?
Thanks in Advance!
>> Stay informed about: Custom 404 page