Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

web.config - <customErrors>...<error>

0 views
Skip to first unread message

Tom Zehrbach

unread,
Feb 17, 2003, 7:08:18 PM2/17/03
to
Does this actually work for anyone? I'm using IIS6.0 and it doesn't appear
to like it.


(Example)
<customErrors mode="On">

<error statusCode="404" redirect="NotFound.htm"/>

</customErrors>

NotFound.htm exists in my web application directory but the default page is
always displayed.


Jian-Shen Lin[MSFT]

unread,
Feb 18, 2003, 12:59:45 AM2/18/03
to
Errors related to HTM files will be handled by IIS and not ASP.NET (as HTM
files are not handled by ASP.NET at all) -- so setting these error handling
pages in web.config will not have any effect on HTM files.
if custom error
handling is required for those, this can be modified by changing IIS
settings
(under "Custom Errors" tab in MMC)

<customErrors mode="On" defaultRedirect="Error.aspx">

<error statusCode="404" redirect="Notfound.aspx" />

</customErrors>

Best Regards

Jian Shen

This posting is provided "AS IS" with no warranties, and confers no rights.

Thomas Zehrbach

unread,
Feb 18, 2003, 10:01:21 AM2/18/03
to
The htm(l) file in my example refers to the page to be displayed if
asp.net cannot find a resource requested by an application (error 404 is
encountered) - it has nothing to do with the resource I'm requesting.

According to Microsoft's documentation, the <error> element is supported
by IIS5.0 (though no mention is made
about IIS6.0).

Yes, you CAN remap this in IIS, however I'm studying for MCAD/MCSD
certification and need to know if the <error> element within
<customErrors> of the web.config actually works (am I doing something
wrong, or is this feature no longer supported in IIS6.0)

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

0 new messages