Article ID: 925764 - View products that this article applies to.
Consider the following scenario. A client Web browser sends a request for an active server page (ASP) to a Web server that is running Internet Information Services (IIS) 6.0. The ASP request generates a large response. In this scenario, the following symptoms may occur:
This issue occurs because of a change in behavior that was introduced in IIS 6.0 and added to IIS 5.0. These versions of IIS enforce a default ASP response buffer limit of 4 MB. This limit prevents large ASP responses from adversely affecting the IIS process that hosts the Web application. If an ASP request generates a response that is larger than the configured buffer limit, you experience the symptoms that are mentioned in the "Symptoms" section.
In most scenarios, the 4 MB buffer limit is sufficient for ASP responses that are sent to Web clients. If this limit is insufficient, use one of the following methods:
Method 1: Decrease the response sizeIf the response is larger than the 4 MB default value, this size frequently causes a poor user experience. The Web browser must receive the large response over the network. Then, the Web browser must parse and display a very large HTML response.
If the Web client that receives the response does not have to view the whole response as a single page, you can decrease the response size. For example, you can rewrite the ASP-based application so that data is presented in a grid. Therefore, the Web client can browse the data one page at a time. You can use the GridView class in Microsoft ASP.NET to achieve this effect. For more information about the GridView class in ASP.NET, visit the following Microsoft Developer Network (MSDN) Web site:
Method 2: Use the Response.Flush methodIf you use a loop in the ASP file to build a large table or construct data, you can use the Response.Flush method. When you use this method, you can still use buffering. However, you also have complete control over the amount of data that is sent to the Web client, and you can control the buffer size of the response. For more information about the Response.Flush method, visit the following MSDN Web site:
Method 3: Disable bufferingYou can disable buffering on the Web server, at the application level, or at the page level. When you disable buffering, the Web server uses HTTP chunked-transfer encoding to send the response to the Web client.
To disable buffering at the application level, you can use the AspBufferingOn IIS metabase property. For more information about the AspBufferingOn IIS metabase property, visit the following Microsoft Web site:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/fbe1bd5f-52d4-4a26-8ab1-7bb897bb3d53.mspxTo disable buffering at the page level, you can use the Response.Buffer property. For more information about the Response.Buffer property, visit the following MSDN Web site:
Method 4: Increase the buffer limitYou can increase the buffering limit if one of the following conditions is true:
To increase the buffering limit, follow these steps:
For more information about the AspBufferingLimit IIS metabase property, visit the following Microsoft Web site:
Article ID: 925764 - Last Review: May 11, 2007 - Revision: 1.3