Streaming inside WCF data contracts

WCF supports operations with streaming parameters natively, if you use either a Stream or a Message object as parameters. But if the stream is inside a data contract, it's not as trivial. This sample shows a way to get streaming inside a data contract in a WCF operation.

C# (48.7 KB)
 
 
 
 
 
4.8 Star
(4)
2,497 times
Add to favorites
4/13/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • how to stream larger data
    2 Posts | Last post April 24, 2012
    • I want to send  byte[] fileContents = new byte[100000]; instead of  byte[] fileContents = new byte[100];
      And that is not working for me.
      
      Do you have any solution for this?
    • You're probably hitting some quota (by default, message sizes are limited to 64k, and you're trying to send 100k). Try either increasing the maxReceivedMessageSize quota (in the server binding, and in the client config). If it doesn't work, try enabling tracing to see if there is an exception which explains why your scenario isn't working.