title: "The request channel timed out while waiting for a reply" in WCF service
body: <p>I'm running a WCF service hosted by a windows service (calling from a asp.net site).</p>
  
  <p>When I get a timeout (because the <em>sendTimeout</em> attribute has been exceeded) while calling through a "BasicHttp" endpoint, I get expected error message:</p>
  
  <p><em>"The request channel timed out while waiting for a reply after 00:01:00. ...."</em></p>
  
  <p>but when calling through a NetTcp endpoint (with Transport security) I get the more general error:</p>
  
  <p><em>"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state."</em> </p>
  
  <p>Does anybody know why that is? Am I missing something in the configuration?</p>
  
  <p>My client-side configuration is:</p>
  
  <pre><code>    &lt;netTcpBinding&gt;
              &lt;binding name="netTcpBindingConfig" closeTimeout="00:01:00"
               openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:00:10"
               transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
               hostNameComparisonMode="StrongWildcard" listenBacklog="10"
               maxBufferPoolSize="524288" maxBufferSize="655360" maxConnections="10"
               maxReceivedMessageSize="65536000"&gt;
                  &lt;readerQuotas maxDepth="32" maxStringContentLength="65536000" maxArrayLength="16384"
                      maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
                  &lt;reliableSession ordered="true" inactivityTimeout="00:10:00"
                      enabled="false" /&gt;
                  &lt;security mode="Transport"&gt;
                      &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /&gt;
                      &lt;message clientCredentialType="Windows"  /&gt;
                  &lt;/security&gt;
              &lt;/binding&gt;
          &lt;/netTcpBinding&gt;
  
  
          &lt;basicHttpBinding&gt;
  
              &lt;binding name="basicHttpBindingConfig" closeTimeout="00:01:00"
                  openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:00:00.500"
                  bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                  maxBufferPoolSize="524288" maxReceivedMessageSize="65536000"
                  messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                  allowCookies="false"&gt;
                  &lt;readerQuotas maxDepth="32" maxStringContentLength="65536000" maxArrayLength="16384"
                      maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt;
              &lt;/binding&gt;
  
          &lt;/basicHttpBinding&gt;
  </code></pre>
  
  <p>Service config:</p>
  
  <pre><code>    &lt;basicHttpBinding&gt;
        &lt;binding name="basicHttpBinding_config" maxReceivedMessageSize="5000000"&gt;
          &lt;readerQuotas maxDepth="9000000" maxStringContentLength="9000000"
          maxArrayLength="9000000" maxBytesPerRead="9000000" maxNameTableCharCount="9000000" /&gt;
        &lt;/binding&gt;
      &lt;/basicHttpBinding&gt;
  
      &lt;netTcpBinding&gt;
        &lt;binding name="tcpBinding_config" maxReceivedMessageSize="5000000" maxBufferSize="5000000" maxBufferPoolSize="5000000" &gt;
          &lt;readerQuotas maxDepth="9000000" maxStringContentLength="9000000"
            maxArrayLength="9000000" maxBytesPerRead="9000000" maxNameTableCharCount="9000000" /&gt;
        &lt;/binding&gt;
      &lt;/netTcpBinding&gt;
  </code></pre>
  
  <p>Any help is much appreciated!
  Thanks!</p>
  
  <p>Jon</p>