Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Response Buffer Limit Exceeded

Reply
Thread Tools

Response Buffer Limit Exceeded

 
 
Ron Hinds
Guest
Posts: n/a
 
      11-19-2008
I'm getting this in an ASP application on IIS6/W2K3. The page in question is
trying to return a XML file approximately 45MB in size. Changing this is not
an option. Worked fine on IIS5/W2K. I tried Response.Buffer = False, no joy.
So I searched on MSDN and found instructions for increasing the
AspBufferingLimit property in the metabase. I increased it to 100MB for that
web application, stopped and restarted that web application, still same
result.

I ran into a similar problem on the same web app in two pages where we are
trying to receive a file of approx. 10MB in size. I was told to set the
AspMaxRequestEntityAllowed property in the metabase for the specific pages.
I set it to 16MB for each - they still don't work, either. How can I make my
legacy app work in IIS6?



 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      11-19-2008
"Ron Hinds" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm getting this in an ASP application on IIS6/W2K3. The page in question
> is trying to return a XML file approximately 45MB in size. Changing this
> is not an option. Worked fine on IIS5/W2K. I tried Response.Buffer =
> False, no joy. So I searched on MSDN and found instructions for increasing
> the AspBufferingLimit property in the metabase. I increased it to 100MB
> for that web application, stopped and restarted that web application,
> still same result.
>
> I ran into a similar problem on the same web app in two pages where we are
> trying to receive a file of approx. 10MB in size. I was told to set the
> AspMaxRequestEntityAllowed property in the metabase for the specific
> pages. I set it to 16MB for each - they still don't work, either. How can
> I make my legacy app work in IIS6?
>
>


Perhaps you can describe exactly how you went about making those setting
changes because they are exactly the right ones to correct your problem(s).

--
Anthony Jones - MVP ASP/ASP.NET

 
Reply With Quote
 
 
 
 
Daniel Crichton
Guest
Posts: n/a
 
      11-20-2008
Ron wrote on Wed, 19 Nov 2008 13:07:33 -0800:

> I'm getting this in an ASP application on IIS6/W2K3. The page in
> question is trying to return a XML file approximately 45MB in size.
> Changing this is not an option. Worked fine on IIS5/W2K. I tried
> Response.Buffer = False, no joy. So I searched on MSDN and found
> instructions for increasing the AspBufferingLimit property in the
> metabase. I increased it to 100MB for
> that web application, stopped and restarted that web application,
> still same result.


> I ran into a similar problem on the same web app in two pages where we
> are trying to receive a file of approx. 10MB in size. I was told to
> set the AspMaxRequestEntityAllowed property in the metabase for the
> specific
> pages. I set it to 16MB for each - they still don't work, either. How can
> I
> make my legacy app work in IIS6?



I wouldn't go messing with the settings - instead, chunk out the XML file in
small pieces. If this XML is coming from a file then you could use an ADO
Stream object to do this quite simply. Even turning off the buffering
doesn't help if you try to send a large file all in one go.

AspMaxRequestEntityAllowed is for incoming data to the server, not for
outgoing data - the clue is in the property name which contains the word
Request. The value you would need to change is AspBufferLimit, eg.

cscript.exe adsutil.vbs SET w3svc/aspbufferinglimit 104857600

will increase the limit to 100MB. However, I would strongly recommend
against this as it makes your application reliant on that setting. What
happens when you want to push out a 250MB file, or a 500MB, or even bigger.
Instead of adjusting that to suit your app, make your app send the file out
in pieces.

Here's some code that works on my site:


Set oStream = Server.CreateObject("ADODB.Stream")
Call oStream.Open()
oStream.Type = 1
call oStream.LoadFromFile(strDir & strFilename)

Response.ContentType = "application/octet-stream"
Response.AddHeader "Content-Disposition", "filename=" &
strFilename & ";"
Response.AddHeader "Content-Length", oStream.Size

Response.Buffer = False

'stream out the file in chunks
Do While Not (oStream.EOS)
Response.BinaryWrite oStream.Read(1024 * 256)
Loop

oStream.Close
Set oStream = Nothing

Response.End


strDir and strFilename are variables holding the directory and the filename
that is to be sent respectively.

This sets the ContentType and filename in the headers, and it's total length
so that the browser download dialog can show the user a progress percentage
if supported. Buffering is then turned off (it's on by default for the
server and this site too). It then reads 256kB at a time and sends it to the
browser - sending in small chunks with buffering off automatically clears
the buffer after each BinaryWrite call. So far it's worked well on all the
files I've delivered from my application, although they have been reasonably
small (up to around 35MB) but with the default 4MB limit of IIS6.

--
Dan


 
Reply With Quote
 
Ron Hinds
Guest
Posts: n/a
 
      12-10-2008

"Anthony Jones" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Ron Hinds" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I'm getting this in an ASP application on IIS6/W2K3. The page in question
>> is trying to return a XML file approximately 45MB in size. Changing this
>> is not an option. Worked fine on IIS5/W2K. I tried Response.Buffer =
>> False, no joy. So I searched on MSDN and found instructions for
>> increasing the AspBufferingLimit property in the metabase. I increased it
>> to 100MB for that web application, stopped and restarted that web
>> application, still same result.
>>
>> I ran into a similar problem on the same web app in two pages where we
>> are trying to receive a file of approx. 10MB in size. I was told to set
>> the AspMaxRequestEntityAllowed property in the metabase for the specific
>> pages. I set it to 16MB for each - they still don't work, either. How can
>> I make my legacy app work in IIS6?
>>
>>

>
> Perhaps you can describe exactly how you went about making those setting
> changes because they are exactly the right ones to correct your
> problem(s).
>


Sorry it took so long to get back to you! OK, here is what I did:

1. In IIS Manager, locate the file in question, right-click, go to
Properties, HTTP Headers, check Enable content expiration, click Apply,
un-check Enable content expiration (this creates the file in the metabase
treeview)

2. Start Metabase Explorer. Locate the web app, then the file. Right-click
and add new DWORD record. Make the record name AspBufferingLimit. Click OK.

3. Double-click the new record. On the value tab, enter 10485760 (10MB for
example). On the General tab, set User Type to File and Attributes to
Inheritable. Those last two weren't in the original instructions I got from
Microsoft but I added them afterward since it didn't work the first time.

4. Stop and restart the web application.

If there is something I am missing, please let me know. Thank you!




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Response Buffer Limit Exceeded Problems - Ideas Please! Brian Piotrowski ASP General 3 09-08-2004 12:17 PM
Response Buffer Limit Exceeded Steve Bywaters ASP General 2 08-28-2004 07:29 AM
Response Buffer Limit Exceeded Help Needed Brian Piotrowski ASP .Net 0 08-27-2004 05:26 PM
can i modify the content in the buffer of response(not response.buffer prep) xingye ASP General 9 04-19-2004 03:49 AM
Response Buffer Limit Exceeded Omar ASP General 3 02-26-2004 05:53 PM



Advertisments