Stop iis response stream internal buffering

G

Guest

Hello -

Ive created an HttpHandler for uploading binary files to an http compliant
client (not a browser). These files I upload are fairly large around 256 MB.
My code essentially chunks up the file into small pieces and writes it to
the response stream (using response.BinaryWrite.). I have the response
property BufferOutput set to false and disabled all caching using
SetCacheability(HttpCacheability.NoCache).
Sessionstate is also disabled.

Recently I noticed my code will have finished chunking and writing the file
to the response stream and the client will only have received about 5% of the
file. It appears the uploaded file is first being buffered in the response
stream before being sent to the client. How can I prevent this? I want the
response stream to
immediately send the file chunks directly to the server w/o any iis
bufffering (preferably by blocking) when I call BinaryWrite. Another side
effect of this problem is the iis process is consuming huge amounts of ram
since its holding the entire response stream in memory. Can this be
prevented or is this IIS's default behavior?
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top