Why doesn't wsHttpBinding support streaming?
EDIT: To test my comment about netTcpBinding, I tried following code, which gives runtime error:
<netTcpBinding >
<binding name="myBinding" transferMode="Streamed">
<reliableSession enabled="true"/>
</binding>
</netTcpBinding>
Runtime exception:
Unhandled Exception: System.InvalidOperationException: Transfer mode Streamed is
not supported by ReliableSessionBindingElement.
at System.ServiceModel.Channels.ReliableSessionBindingElement.VerifyTransport
Mode(BindingContext context)
if <reliableSession enabled="true"/>
is removed, the code works.
WsHttpBinding doesn't support streaming due to the reliable messaging protocol (WS-RM), which requires that messages are buffered on either end.
As stated here...more info about WS-RM.
There is also another post here that provides the reasoning for not being able to stream versus the why above...
This is because WS-RM needs to apply signing/checksums to the whole message as a unity, etc; and this is not possible when streamed transferMode, only with buffered transferMode...
In addition netTcpBinding actually makes use of WS-RM for reliability purposes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With