Click here to Skip to main content
14,878,718 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've overriden a Stream, and returned it from server to client,
i've been trying all kind of configuration, but i saw that no matter what, the array is always 65536 sized in the Read

public override int Read(byte[] array, int offset, int count)

tried to change all kind of configuration:

<binding name="webHttpBindingConfig" transferMode="Streamed" maxReceivedMessageSize="9999" maxBufferSize="9999" maxBufferPoolSize="9999">
          <readerQuotas maxDepth="32" maxStringContentLength="81921" maxArrayLength="163841" maxBytesPerRead="40961" maxNameTableCharCount="163841"/>
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>

Is there anything that affects it?

1 solution

Looks like you need to set maxReceivedMessageSize to some higher value

Please refer -[^]
arielb 28-Oct-13 5:43am
didn't help.. its still 65536 bytes per "Read".

i find that 400MB files take much time to download, maybe its because of the chunks?
Ranjan.D 28-Oct-13 7:16am
You will have to try out some other options to download large files, I never worked this case and 400MB is really a huge thing to deal. Try WCF Chunking of data.
arielb 28-Oct-13 8:38am
WCF should handle it, how can i enable chunking?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900