Tuesday, May 29, 2007

ASPBufferingLimit - IIS5 vs. IIS6

On upgrading a web server from Win2K/IIS5 to Win2K3/IIS6, an old classic ASP application stopped working. This app pulled a large recordset from a SQL database, dumped the records into a large array, and then looped through the array, rendering a grid. I'm not sure why it needed the intermediate step, but of course the developer was long gone from the company. Such is life. Here's the error encountered:


First I ruled out the most obvious and usual offenders during a migration - code and data. Configuring the app on my development machine (IIS5), pulling down the production code and pointing to the production db, the app functioned swimmingly.

Moving on, I researched and came across an IIS ADSI property, "ASPBufferingLimit". Apparently IIS6 sets a lower constraint on the ASP Buffer than IIS5. Good for a healthy web server, but bad for some legacy apps.

The issue was resolved by upping the buffer limit on the IIS6 server. The server administrator accomplished this by running:

    c:\inetpub\adminscripts\adsutil.vbs set w3svc/aspbufferinglimit value
Note: The default setting in IIS6 is ~4MB. The default setting in IIS5 is not visible, apparently, but is rumored to be ~128MB. That seems high to me but I have no choice other than to trust google research :)

200 comments: