in Education by

What is Streaming in WCF?

1 Answer

0 votes
by

In WCF any receiving message is delivered only once entire message has been received. What I mean here is that first message is buffered at the receiving side and once it is fully received it gets delivered to the receiving end. Main problem with this approach is that receiver end is unresponsive while message is getting buffered. So default way of message handling in WCF is ok for small size messages but for the large size messages this approach is not good. So to overcome this problem Streaming in WCF come into action.

Steaming and Binding

  1. TCP, IPC and HTTP bindings support streaming.
  2. For all the Binding streaming is disabled by default.
  3. Streaming of the message should be enabled in the binding to override the buffering and enable the streaming.
  4. TransferMode property should be set according to the desired streaming mode in the bindings.
  5. Type of TransferMode property is enum TransferMode

Configuring Streaming in Config file

  1. <system.serviceModel>  
  2.     <services>  
  3.         <service name="OneWayService.Service1" behaviorConfiguration="OneWayService.Service1Behavior">  
  4.             <!-- Service Endpoints -->  
  5.             <endpoint address="" binding="basicHttpBinding" bindingConfiguration="StreamedHttp" contract="OneWayService.IService1">  
  6.                 <identity>  
  7.                     <dns value="localhost" /> </identity>  
  8.             </endpoint>  
  9.             <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service>  
  10.     </services>  
  11.     <bindings>  
  12.         <basicHttpBinding>  
  13.             <binding name="StreamedHttp" transferMode="Streamed" /> </basicHttpBinding>  
  14.     </bindings>  
  15.     <behaviors>  
  16.         <serviceBehaviors>  
  17.             <behavior name="OneWayService.Service1Behavior">  
  18.                 <serviceMetadatahttpGetEnabled="true" />  
  19.                 <serviceDebugincludeExceptionDetailInFaults="false" /> </behavior>  
  20.         </serviceBehaviors>  
  21.     </behaviors>  
  22. </system.serviceModel>  

Related questions

0 votes
    What is Information cards in WCF?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What is Instance Management in WCF?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What you understand by Fault Exception in WCF?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What is Duplex in WCF? Explain also Message Exchange Pattern?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What is WCF Messaging Layer?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What is Method overloading in WCF?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What is MSMQ in WCF?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    Explain bindings in WCF with description?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    Explain briefly different Instance Modes in WCF?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What Message Exchange Patterns (MEPs) supported by WCF? Explain each of them briefly....
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What is Transport level security in WCF?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What is SOA, and Messages in WCF?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    What is Security Implementation in WCF? How many are there?...
asked Apr 3, 2021 in Education by JackTerrance
0 votes
    How to create Basic HTTP Binding in WCF?...
asked Apr 3, 2021 by JackTerrance
0 votes
    What is Exception Handling in WCF? What are the ways for WCF Exception Handling?...
asked Apr 2, 2021 in Education by JackTerrance
...