IIS 5 & IIS 6
Response.Flush breaks IIS's "Custom Errors"
Re: Response.Flush breaks IIS's "Custom Errors"
May 23, 2006 06:44 PM|goinoutwest|LINK
Yeah, here's some repro instructions:
1) Configure a "Custom Error" using IIS mgr for the 500;100 error. Choose a File or URL and point to the page you'd like to have as your error message.
2) Create a Test.asp page, and make the contents the following:
<%@ Language=VBScript %>
' TURN ON BUFFERING
Response.Buffer = TRUE
' FLUSH THE CONTENT AND HEADERS TO THE CLIENT
' CAUSE AN ERROR
3) Browse to the page and observe that your selected error page appears before you. Finally, UNcomment the "Response.Flush()" line of code. Reload page in your browser. Your "error handling" page is not invoked.
Thanks for taking a look!