WCF streams in 4K pieces!

My WCF project uses Mtom and streaming , and set MaxBytesPerRead to 32K (on the client and server), but when I run p>

read = fs.read(buffer, 0, buffer.length)

it does not allow me to read more than 4096 bytes (4k) at a time (32K buffer is not filled, it is filled with zeros)

Is there a way to transfer a stream of files with several megabytes to chunks larger than 4K (say yes) ???

+5
source share
1 answer

4096 - FileStream, , , , . , 4k , , MemoryStream .

+2

All Articles