簡體   English   中英

為什么wsHttpBinding不支持流媒體?

[英]Why doesn't wsHttpBinding support streaming?

為什么wsHttpBinding不支持流媒體?

編輯:為了測試我對netTcpBinding的評論,我嘗試了下面的代碼,它給出了運行時錯誤:

<netTcpBinding >
        <binding name="myBinding"  transferMode="Streamed">          
          <reliableSession enabled="true"/>
        </binding>
</netTcpBinding>

運行時異常:

Unhandled Exception: System.InvalidOperationException: Transfer mode Streamed is
 not supported by ReliableSessionBindingElement.
   at System.ServiceModel.Channels.ReliableSessionBindingElement.VerifyTransport
Mode(BindingContext context)

如果刪除了<reliableSession enabled="true"/> ,則代碼可以正常工作。

由於可靠的消息傳遞協議(WS-RM),WsHttpBinding不支持流式傳輸,這要求消息在任一端緩沖。

如前所述這里 ...更多信息WS-RM

也有另一篇文章在這里它提供了能夠,為什么上面流相對於推理...

這是因為WS-RM需要將簽名/校驗和作為統一等應用於整個消息; 當流傳輸模式時,這是不可能的,只有緩沖的transferMode ...

此外, netTcpBinding實際上使用WS-RM來實現可靠性。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM