Does WCF support Chunked Transfer Encoding

.net, c#, http, wcf

Solution

Yes, it does support it, but it needs to be set at the transport binding. If you're using the `WebHttpBinding`, you can set the `TransferMode` property to `TransferMode.Streamed` If you're using a custom binding, you can set that property on the `HttpTransportBindingElement`.

Problem

Does WCF support Chunked Transfer Encoding? I've been looking on the Web but I couldn't find much on the subject. My WCF REST APIs are all using WebOperationContext.CreateStreamResponse to return a response to the client. Using that APIs on the WebOperationContext, I was hoping that the Transfer-Encoding: chunked would be turned on.

Original source