[英]Why doesn't wsHttpBinding support streaming?
Why doesn't wsHttpBinding support streaming? 为什么wsHttpBinding不支持流媒体?
EDIT: To test my comment about netTcpBinding, I tried following code, which gives runtime error: 编辑:为了测试我对netTcpBinding的评论,我尝试了下面的代码,它给出了运行时错误:
<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. 如果删除了<reliableSession enabled="true"/>
,则代码可以正常工作。
WsHttpBinding doesn't support streaming due to the reliable messaging protocol (WS-RM), which requires that messages are buffered on either end. 由于可靠的消息传递协议(WS-RM),WsHttpBinding不支持流式传输,这要求消息在任一端缓冲。
As stated here ...more info about WS-RM . 如前所述这里 ...更多信息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; 这是因为WS-RM需要将签名/校验和作为统一等应用于整个消息; and this is not possible when streamed transferMode, only with buffered transferMode... 当流传输模式时,这是不可能的,只有缓冲的transferMode ...
In addition netTcpBinding actually makes use of WS-RM for reliability purposes. 此外, netTcpBinding实际上使用WS-RM来实现可靠性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.