title: Transfer mode Streamed is not supported by ReliableSessionBindingElement
body: <p>I am designing a duplex channel wcf service using a custom binding. Currently, when I compile my class library, I am getting the following error:</p>
  
  <blockquote>
    <p>Transfer mode Streamed is not
    supported by
    ReliableSessionBindingElement.</p>
  </blockquote>
  
  <p>Below is my App.config:</p>
  
  <pre><code>&lt;service behaviorConfiguration="transferServiceBehavior" 
                 name="API.FileTransfer.FileTransferService"&gt;
          &lt;endpoint address="json" 
                    behaviorConfiguration="WebHttpEPBehavior"
                    binding="webHttpBinding" 
                    bindingConfiguration="jsonWeb" 
                    name="MyJSONFileTransferEP"
                    contract="API.FileTransfer.IJSONFileTransferService" /&gt;
          &lt;endpoint address="pox" 
                    behaviorConfiguration="WebHttpEPBehavior"
                    binding="webHttpBinding" 
                    bindingConfiguration="poxWeb" 
                    name="MyPOXFileTransferEP"
                    contract="API.FileTransfer.IPOXFileTransferService" /&gt;
          &lt;endpoint address="soap" 
                    behaviorConfiguration="NetTcpEPBehavior"
                    binding="netTcpBinding" 
                    bindingConfiguration="netTcpWeb" 
                    name="MySOAPFileTransferEP"                   
                  contract="API.FileTransfer.ISOAPFileTransferService" /&gt;
          &lt;endpoint address="mex" 
                    binding="mexTcpBinding" 
                    bindingConfiguration=""
                    contract="IMetadataExchange" /&gt;
          &lt;host&gt;
            &lt;baseAddresses&gt;
              &lt;add baseAddress="http://localhost:2544/filetransfer/" /&gt;
              &lt;add baseAddress="net.tcp://localhost:2544/filetransfer/" /&gt;
            &lt;/baseAddresses&gt;
          &lt;/host&gt;
  &lt;/service&gt;
  </code></pre>
  
  <p>The error I am getting is referring to my custom binding which has both reliableSession and compositeDuplex binding elements:</p>
  
  <pre><code>&lt;customBinding&gt;
      &lt;binding name="netTcpCustom" 
               closeTimeout="00:01:00"
               openTimeout="00:01:00"
               receiveTimeout="00:10:00"
               sendTimeout="00:01:00"&gt;
        &lt;reliableSession /&gt;
        &lt;compositeDuplex /&gt;
        &lt;oneWay /&gt;
        &lt;windowsStreamSecurity protectionLevel="None" /&gt;
        &lt;mtomMessageEncoding  /&gt;
        &lt;tcpTransport maxBufferPoolSize="524288"
                      maxReceivedMessageSize="2147483647" 
                      connectionBufferSize="8192"
                      hostNameComparisonMode="StrongWildcard" 
                      channelInitializationTimeout="00:01:00"
                      maxBufferSize="2147483647" 
                      maxPendingConnections="20" 
                      maxOutputDelay="00:00:00.2000000"
                      maxPendingAccepts="5" 
                      transferMode="Streamed" 
                      listenBacklog="20"
                      portSharingEnabled="false" 
                      teredoEnabled="false"&gt;
          &lt;connectionPoolSettings groupName="default" leaseTimeout="00:05:00"
              idleTimeout="00:02:00" maxOutboundConnectionsPerEndpoint="20" /&gt;
        &lt;/tcpTransport&gt;
      &lt;/binding&gt;
    &lt;/customBinding&gt;
  </code></pre>
  
  <p>After some searching, I found out that you cannot use streaming when using reliable messaging (WS-RM). 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.</p>
  
  <p>Since I am designing a duplex binding channel and I am using this service for the upload of large files, i need transferMode = streamed AND the reliable session binding element.</p>
  
  <p>Does anybody know how to attack this? Can you show me how it is done?</p>
  
  <p>Thanks in advance.</p>