Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 245198 - Last Review: June 30, 2004 - Revision: 3.1
INFO: Response.Buffer Is ON by Default in Internet Information Services 5.0
This article was previously published under Q245198
In Internet Information Services (IIS) 5.0, the
Response.Buffer property is ON (set to TRUE) by default, which is a change from Internet Information Server 4.0. To illustrate this, run the following Active Server Pages (ASP) code in Internet Information Server 4.0 and Internet Information Services 5.0:
<%
Response.Write "Before" & "<BR>"
Response.Buffer = FALSE
Response.Write "After" & "<BR>"
%>
When you run this code in Internet Information Services 5.0, the following error message appears:
Response object, ASP 0157 (0x80004005)
Buffering On
Buffering cannot be turned off once it is already turned on.
When you run this code in Internet Information Server 4.0, the following text appears:
This design change gives the following advantages:
- Improved performance.
- If an error occurs in your ASP code, IIS displays a custom error page instead of the error message inline in the page.
- You can set headers and cookies at any point in the page, not just before you send any content.
- You can also redirect at any point in the page.
The only caveat to buffering is that users have to wait until the entire page is rendered.
To turn buffering off in IIS 5.0:
- Start the Internet Service Manager (ISM), which loads the Internet Information Server snap-in for the Microsoft Management Console (MMC).
- Right-click the Web site, and then click Properties.
- On the Home Directory tab, in the Application Settings section, click Configuration.
- On the App Options tab, clear the Enable buffering check box.
- Click OK twice to return to the IIS snap-in.
APPLIES TO
- Microsoft Active Server Pages 4.0
- Microsoft Internet Information Services 5.0
| kbcodesnippet kbinfo KB245198 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate