title: WCF Streaming with authentication
body: <p>I have a WCF service which must be secured with Windows and Certificate authentication.
  I know that wsHttpBinding does no support Streaming but <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.transfermode.aspx" rel="nofollow">according to msdn</a> it can be done using transport security with a customBinding but I am not able to do it... </p>
  
  <pre><code>&lt;customBinding&gt;
      &lt;binding name="AuthBinding"&gt;
        &lt;mtomMessageEncoding maxBufferSize="65535" /&gt;
        &lt;windowsStreamSecurity protectionLevel="Sign"/&gt;
        &lt;httpTransport transferMode="Streamed" maxReceivedMessageSize="2147483647" /&gt;
      &lt;/binding&gt;
  &lt;/customBinding&gt;
  </code></pre>
  
  <p>I am going from one exception to another :</p>
  
  <blockquote>
    <p>The security capabilities of binding 'System.ServiceModel.Channels.CustomBinding' do not match those of the generated runtime object. Most likely this means the binding contains a StreamSecurityBindingElement, but lacks a TransportBindingElement that supports Stream Security</p>
  </blockquote>
  
  <p>Or </p>
  
  <blockquote>
    <p>The request message must be protected. This is required by an operation of the contract ('IEntity','WebService.Entity'). The protection must be provided by the binding ('CustomBinding','WebService.Entity')</p>
  </blockquote>