WCF + net.tcp Communication Timeout problem

Anand Thangappan picture Anand Thangappan · Apr 7, 2011 · Viewed 7.9k times · Source

I have some critical problem in my project. During transaction time with (wcf + netTCP) I was getting the exception is.

The communication object, 
System.ServiceModel.Channels.ClientFramingDuplexSessionChannel, 
cannot be used for communication because it is in the Faulted state.

In WCF service app.config add binding tag with timeout specification. But my transaction has been ended within 10 min. what was the problem..

 <bindings>
      <basicHttpBinding>
        <binding name="ServiceSoap" closeTimeout="0:01:00" openTimeout="0:01:00" receiveTimeout="10:00:00" sendTimeout="10:00:00" allowCookies="false"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
          messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
          useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
      <netTcpBinding>
        <binding name="b1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="infinite" sendTimeout="10:00:00"

transferMode="Buffered"

maxBufferPoolSize="524288"

maxBufferSize="65536"

maxConnections="10"

maxReceivedMessageSize="65536">
          <security mode="None" />
        </binding>
      </netTcpBinding>
    </bindings>

Any one help me !!!..

Answer

Jon Mitchell picture Jon Mitchell · Apr 7, 2011

I'm not sure why you think its a timeout issue? The error message doesn't suggest a timeout has ocured. Could the server be throwing an exception?

I would strongly recommend setting up WCF tracing. Its a bit involved but really worth doing as I've solved many obscure WCF issue with it.