Hello,
I'm running a WCF service hosted by a windows service (calling from a asp.net site).
When I get a timeout (because the sendTimeout attribute has been exceeded) while calling through a "BasicHttp" endpoint, I get expected error message:
"The request channel timed out while waiting for a reply after 00:01:00. ...."
but when calling through a NetTcp endpoint (with Transport security) I get the more general error:
"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state."
Does anybody know why that is? Am I missing something in the configuration?
My client-side configuration is:
<netTcpBinding>
<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">
<readerQuotas maxDepth="32" maxStringContentLength="65536000" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
<basicHttpBinding>
<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">
<readerQuotas maxDepth="32" maxStringContentLength="65536000" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
</binding>
</basicHttpBinding>
Service config:
<basicHttpBinding>
<binding name="basicHttpBinding_config" maxReceivedMessageSize="5000000">
<readerQuotas maxDepth="9000000" maxStringContentLength="9000000"
maxArrayLength="9000000" maxBytesPerRead="9000000" maxNameTableCharCount="9000000" />
</binding>
</basicHttpBinding>
<netTcpBinding>
<binding name="tcpBinding_config" maxReceivedMessageSize="5000000" maxBufferSize="5000000" maxBufferPoolSize="5000000" >
<readerQuotas maxDepth="9000000" maxStringContentLength="9000000"
maxArrayLength="9000000" maxBytesPerRead="9000000" maxNameTableCharCount="9000000" />
</binding>
</netTcpBinding>
Any help is much appreciated! Thanks!
Jon