0

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 !!!..

Anand Thangappan
  • 3,068
  • 2
  • 28
  • 31

3 Answers3

4

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.

Jon Mitchell
  • 3,349
  • 5
  • 27
  • 37
  • Without seeing more of the code I don't know how I could solve this problem. There could be a serialization issue? You really need to setup WCF Tracing to further debug the problem. – Jon Mitchell Apr 08 '11 at 07:39
2

This is not a complete answer but if you are using the client + server on the same machine you can use a named-pipe binding instead of netTcp

The binding section the configurations might look like this.

<netNamedPipeBinding>
  <binding name="infiniteOpenBindingConfig" receiveTimeout="infinite" closeTimeout="infinite">
  </binding>
</netNamedPipeBinding>

To keep the binding alive indefinitely the configuration above must be set both on server and client.

Filip
  • 656
  • 4
  • 8
2

Try adding this to your netTcpBinding:

<reliableSession inactivityTimeout="infinite" enabled="true" />

And if that doesn't work, enable WCF tracing to find out what's killing it.

BrandonZeider
  • 8,014
  • 2
  • 23
  • 20