title: upload streaming to WCF IIS 7 hosted service not working
body: <p>I have a wcf service I am setting up to run under IIS 7. I have the service set to streaming for the transfermode.
  When I self host the service in a console application every thing seems to work ok.  But when the client connects to an iis hosted service it seems to be buffering, and the client eventual times out.  I have used fiddler to determine that this client time out happens before the http request is even made.</p>
  
  <p>Here is the servers binding.</p>
  
  <pre><code>var binding = new CustomBinding();
              binding.Elements.Add( new TextMessageEncodingBindingElement()
              {
                  MessageVersion = MessageVersion.Soap12WSAddressing10
              } );
  
              var secBinding = SecurityBindingElement.CreateUserNameOverTransportBindingElement();
              secBinding.AllowInsecureTransport = true;
              binding.Elements.Add( secBinding );
              binding.Elements.Add( new HttpTransportBindingElement()
              {
                  TransferMode = TransferMode.Streamed,
                  MaxReceivedMessageSize = Int32.MaxValue,
  
              } );
  </code></pre>
  
  <p>And the client binding:</p>
  
  <pre><code>var binding = new CustomBinding();
              binding.Elements.Add( new TextMessageEncodingBindingElement()
              {
                  MessageVersion = MessageVersion.Soap12WSAddressing10
              } );
  
              var secBinding = SecurityBindingElement.CreateUserNameOverTransportBindingElement();
              secBinding.AllowInsecureTransport = true;
              binding.Elements.Add( secBinding );
              binding.Elements.Add( new HttpTransportBindingElement()
              {
                  TransferMode = TransferMode.Streamed,
                  MaxReceivedMessageSize = Int32.MaxValue,
                  MaxBufferSize = 400
              } );
  </code></pre>
  
  <p>As an aside the connection is timing out because the stream is infinite and the server should read the first few bytes and then close the stream. </p>