1

We have a classic ASP application running on Windows Server 2012 and IIS (version 8) web server and had to modify a page to allow retrieval of a larger data set from the database. When we run this without amending any IIS settings we receive the error below in IE;

enter image description here

We have tried amending the buffer level at the site level and IIS application level from the standard 4194304 (4Mb) limit to 20971520 (20Mb) but when we do the output changes to the image below in IE and in chrome it continually asks for credentials every 20 seconds or so.

Why is this happening? How do we resolve please?

enter image description here

AJF
  • 1,801
  • 4
  • 27
  • 54
  • 2
    Possible duplicate of [Response Buffer Limit Exceeded](https://stackoverflow.com/questions/4968006/response-buffer-limit-exceeded) – user692942 Apr 30 '19 at 17:02
  • A simple response.flush in a loop for example could fix the problem... – Sourcery May 08 '19 at 13:52
  • Are you sure there isnt a loop that is missing a next, rs.movenext or similar? That would make the site unreachable aswell... And at the same time fill the buffer. – Sourcery May 09 '19 at 09:36

1 Answers1

1

You're probably best disabling the buffer using Response.Buffer = False

By default, IIS buffers all output, which means as a webpage is being built it get stored in memory (a buffer) until your script has finished executing, and then the whole page is sent from the buffer to the clients machine as one file. If you're constructing a very large page with a lot of data you risk overflowing the buffer. Increasing the buffer size limit is one solution, although I can't see why it would start asking for credentials, you must have misconfigured something in IIS.

Another solution would be to use Response.Flush() to intermittently flush data from the buffer and send the HTML to the clients machine in chunks. But disabling the buffer entirely will do this for you without the need for Response.Flush().

Adam
  • 836
  • 2
  • 8
  • 13
  • 2
    Switching `Response.Buffer` to `False` will help [but it still buffers (its not disabled) the difference is the buffer is automatically flushed](https://stackoverflow.com/a/10190462/692942) with each `Response.Write` call. So if the data you try to write in one call still exceeds the buffer you'll still get the same error. – user692942 Apr 30 '19 at 17:08
  • Is there any downside to just increasing the buffer size? It's 4 MB by default but servers have gotten better since that number was set as the default 20 years ago. I know it goe up to like 2GB - would increasing the buffer size just create more demand on server memory? – Jack Marchetti Mar 11 '20 at 16:14