Response.Buffer

P

PJ

When streaming a file attachment to the response stream, should I set

Response.BufferOutput = False

or

Response.Buffer = False

or both?

TIA~PJ
 
P

PJ

Do you mean: Neither or necessary if you Flush the stream every time in the
loop?

Also, are one or both of these methods needed...
Response.Close()
Response.End()
 
S

Steve C. Orr, MCSD

If you are streaming a single file through your page, and you haven't output
any HTML in this page, then none of the statements you've mentioned are
necessary for the file download to be successful.
 
P

PJ

you appear correct w/ the .Buffer and End properties (as long as i set the
Content-Length header), but if i don't call .Flush() in the loop, then
asp.net will buffer the entire response in memory before the open/save
dialog box appears on the client. this is no good for the large file
downloads we have to
 
S

Steve C. Orr, MCSD

Right, the methods exist mostly for performance reasons. They can improve
performance and scalability in certain situations such as the one you've
mentioned. But they are not necessary; they are optimizations.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top