Response Buffer Limit Exceeded

后端 未结 11 1286
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 10:05

I am running a simple query to get data out of my database & display them. I\'m getting an error that says Response Buffer Limit Exceeded.

11条回答
  •  猫巷女王i
    2020-12-08 10:13

    If you are not allowed to change the buffer limit at the server level, you will need to use the <%Response.Buffer = False%> method.

    HOWEVER, if you are still getting this error and have a large table on the page, the culprit may be table itself. By design, some versions of Internet Explorer will buffer the entire content between before it is rendered to the page. So even if you are telling the page to not buffer the content, the table element may be buffered and causing this error.

    Some alternate solutions may be to paginate the table results, but if you must display the entire table and it has thousands of rows, throw this line of code in the middle of the table generation loop: <% Response.Flush %>. For speed considerations, you may also want to consider adding a basic counter so that the flush only happens every 25 or 100 lines or so.

    Drawbacks of not buffering the output:

    1. slowdown of overall page load
    2. tables and columns will adjust their widths as content is populated (table appears to wiggle)
    3. Users will be able to click on links and interact with the page before it is fully loaded. So if you have some javascript at the bottom of the page, you may want to move it to the top to ensure it is loaded before some of your faster moving users click on things.

    See this KB article for more information http://support.microsoft.com/kb/925764

    Hope that helps.

提交回复
热议问题