[thelist] Custom Errors in IIS

Ken Schaefer ken at adOpenStatic.com
Thu Aug 28 21:59:06 CDT 2003


If Response Buffering is on (which it is in IIS v5 by default), then this
shouldn't happen.

When a 500-100 Internal Server Error (exception raised by ASP) is
encountered, a server.transfer to the registered 500-100 error handler
occurs. Since buffering is on, nothing should have already been sent to the
client. In the 500-100 error handler, you could then dump the buffer with
Response.Clear() if required,

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Diane Soini" <dianesoini at earthlink.net>
Subject: Re: [thelist] Custom Errors in IIS


: I think I understand this.
:
: On Thursday, August 28, 2003, at 01:11 AM,
: thelist-request at lists.evolt.org wrote:
:
: > I have been creating custom ASP error pages to display and setting up =
: > IIS to use them in the event of 404 or ASP errors. The problem with it
: > =
: > is I have it set to URL then the file name and many times if there is
: > an =
: > include file on a page or sometimes on a recordset the error page will
: > =
: > display in the middle of the page (in place of the include) as opposed
: > =
: > to instead of this page. If I set IIS to File then the complete path, =
: > the browser displays the ASP code from the file. Any suggestions?From
: > taranis at spittingllamas.com Wed Aug 27 20:13:20 2003
:
: I do this on a jsp site that I work on. I have an error page for
: exception handling that will show a friendly message when something in
: the code blows up. If the exception happens in one of the template
: parts of a page, that is where the friendly error page will display,
: sometimes with part of the real layout already there. Unless the entire
: page blows up, this error page kind of messes up the layout, because
: <table> might not get closed before </body></html>. There's not much
: (that I know of) to change about that, since the runtime doesn't know
: about an error if it happens after parts of the response have already
: been sent to the browser.
:
: Oh well. That doesn't bother me. In fact, it helps me to debug because
: I know which part of the page is having the error.
:
: Keeping the error page simple helps keep it from looking really weird.
: The 404 error page is more of a complete web page. The exception
: handling error page is plain white.
:
: I'm not very familiar with ASP (I don't know what you mean by setting
: IIS to File), but it sounds like your error page is showing the error
: page(s) for each individual request. Maybe there is a configuration you
: could do that will tell it to error only once and be done with it.



More information about the thelist mailing list