ASP response buffer settings not honored in IIS 7.0 and IIS 7.5


Consider the following scenario. You have a classic ASP application running on IIS 7.0 or 7.5. You set ASP response buffering to FALSE and then execute an ASP page that renders a large amount of data over 4MB. Instead of seeing the page begin rendering in the browser immediately, you notice that the response is still buffered on the server and not rendered immediately. Also, the page data that surpasses 4MB is truncated.


Beginning in IIS 7.0, ASP functionality is implemented inside a HTTP handler called ASPClassic. This handler is mapped to asp.dll and has a 4MB response buffering limit. ASP.dll still buffers the response even though the ASP response buffer setting is set to FALSE inside the ASP feature settings. 


To resolve this issue, run the following APPCMD.exe commands for the website or application in question. 

appcmd.exe set config "Default Web Site" -section:system.webServer/asp /bufferingOn:"False"

appcmd.exe set config "Default Web Site" -section:system.webServer/handlers /[name='ASPClassic'].responseBufferLimit:"0"

NOTE: The above command assumes that the ASP page in question is residing under a website called Default Web Site. This will disable ASP response buffering for the whole website. 

You can also resolve this issue by setting Response.Buffer = FALSE inside the ASP page code.