O'Reilly logo

Microsoft® Windows® Communication Foundation Step by Step by John Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Streaming Data from a WCF Service

MTOM is useful for encoding large binary data objects in messages, but if these objects become too large they can consume significant amounts of memory in the computer hosting the WCF service and the client applications that receive them. Additionally, very large messages can take a long time to construct and transmit, and it is possible that the client application could time-out while waiting for a response containing a large binary object.

In many cases, it does not make sense to even attempt to try and package up data into a single message. Consider a WCF service that provides an operation that emits audio or video data. In this scenario, it is far more efficient to send the data as a stream than to try and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required