I have a custom error script (handling 500 and 500-100 errors), which
calls Server.EXECUTE on another file from within the script. The
script is running on IIS 6 (Windows Server 2003). This script
functions correctly when simply requested through the browser, but
when being used as the ASP 500 error handler, it has some bizarre
behavior. When the an error is generated, the execution of the error
page halts after the Server.EXECUTE call.
This is reproducible in the following example (again on Windows Server
2003 running IIS 6):
***** 500.asp (custom error page)
<%
Response.Write("Custom Error Page Execution Begun<br />")
Server.EXECUTE("custom-error-content.asp")
Response.Write("Custom Error Page Execution Completed<br />")
%>
***** custom-error-content.asp
<%
Response.Write("Error Content Generated<br >")
%>
**** force-error.asp
<%
Set example = New Example 'will generate a run-time error since there
is no class Example defined
%>
Requesting 500.asp from the browser produces the expected output:
* Custom Error Page Execution Begun
* Error Content Generated
* Custom Error Page Execution Completed
Requesting force-error.asp though only produces the following output:
* Custom Error Page Execution Begun
* Error Content Generated
The execution of the error page appears to halt after the
Server.EXECUTE call completes. Does anyone know why this is, or a
workaround for it?
Thanks,
Mike Biang
mike....@gmail.com