By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,214 Members | 2,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,214 IT Pros & Developers. It's quick & easy.

Stop iis response stream internal buffering

P: n/a
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?


Jun 1 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.