2010-12-10 11 views
10

wsHttp समर्थन स्ट्रीमिंग क्यों नहीं करता है?wsHttp समर्थन स्ट्रीमिंग क्यों नहीं है?

संपादित करें: 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"/> निकाल दिया जाता है, कोड काम करता है।

+2

क्योंकि उन्होंने इसे डिज़ाइन नहीं किया था। –

उत्तर

12

WsHttpBinding doesn't support streaming due to the reliable messaging protocol (WS-RM), which requires that messages are buffered on either end.

के रूप में कहा गया है here ... अधिक जानकारी WS-RM के बारे में।

वहाँ भी एक और पोस्ट here कि नहीं बनाम विश्वसनीयता प्रयोजनों के लिए WS-आर एम के ऊपर क्यों ...

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...

अलावा netTcpBinding में वास्तव में बनाता उपयोग स्ट्रीम करने के लिए सक्षम होने के लिए तर्क प्रदान करता है।

+1

धन्यवाद। किसी भी विचार से डब्ल्यूएस-आरएम को संदेशों को बफर करने की आवश्यकता क्यों है? NetTcp बाइंडिंग विश्वसनीयता और स्ट्रीमिंग दोनों प्रदान करता है, इसलिए मैं अनुमान लगा रहा हूं कि स्ट्रीमिंग स्ट्रीमिंग को रोकती नहीं है। – morpheus

+0

@ मॉर्फीस अतिरिक्त टिप्पणी जोड़ें ... –

संबंधित मुद्दे