Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Client fails to connect to NetTcpBinding Endpoint
    primarykey
    data
    text
    <p>I am having issues getting a connection to a NetTcpBinding up and running. I was able to get an Http binding and a Named Pipe binding working however Tcp is giving me a large amount of trouble. I have tried many different things thus far but none have worked.</p> <p>I have read that the issue might be in the max buffer size for the client binding and I upped the maxBufferPoolSize, maxBufferSize, and maxReceivedMessageSize to their maximum. That had no effect. I have read the issue may be port sharing so I enabled port sharing on my machine but that had no effect either. I also disabled the firewall on the machine but that too didn't change anything.</p> <p>The exact error I am getting is:</p> <blockquote> <p>CommunicationException </p> <p>The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.8127832'.</p> </blockquote> <p>From what I have read this is a sort of blanket exception when WCF doesn't exactly know what went wrong.</p> <p>I am at a loss as to what I should attempt next. I hope you can help. </p> <p>Here is the server configuration</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" &gt; &lt;section name="DummyServer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt; &lt;/sectionGroup&gt; &lt;/configSections&gt; &lt;system.serviceModel&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="MetaDataBehavior"&gt; &lt;serviceMetadata/&gt; &lt;serviceDebug /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;services&gt; &lt;service behaviorConfiguration="MetaDataBehavior" name="DummyServiceLibrary.DummyServiceA"&gt; &lt;endpoint binding="basicHttpBinding" contract="DummyServiceLibrary.IDummyService" /&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;endpoint binding="netTcpBinding" contract="DummyServiceLibrary.IDummyService" /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="http://localhost:8080/dummy" /&gt; &lt;add baseAddress="net.tcp://localhost:8523/dummy" /&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt; &lt;applicationSettings&gt; &lt;DummyServer.Properties.Settings&gt; &lt;setting name="ServiceType" serializeAs="String"&gt; &lt;value&gt;A&lt;/value&gt; &lt;/setting&gt; &lt;/DummyServer.Properties.Settings&gt; &lt;/applicationSettings&gt; &lt;/configuration&gt; </code></pre> <p>Here is the client configuration</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;configSections&gt; &lt;sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" &gt; &lt;section name="DummyClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt; &lt;/sectionGroup&gt; &lt;/configSections&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="BasicHttpBinding_IDummyService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;security mode="None"&gt; &lt;transport clientCredentialType="None" proxyCredentialType="None" realm="" /&gt; &lt;message clientCredentialType="UserName" algorithmSuite="Default" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;netTcpBinding&gt; &lt;binding name="NetTcpBinding_IDummyService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize="2147483647"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;security mode="None" /&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="http://localhost:8080/dummy" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IDummyService" contract="DummyService.IDummyService" name="BasicHttpBinding_IDummyService" /&gt; &lt;endpoint address="net.tcp://localhost:8523/dummy" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IDummyService" contract="DummyService.IDummyService" name="NetTcpBinding_IDummyService" /&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; &lt;applicationSettings&gt; &lt;DummyClient.Properties.Settings&gt; &lt;setting name="ClientEndPoint" serializeAs="String"&gt; &lt;value&gt;NetTcpBinding_IDummyService&lt;/value&gt; &lt;/setting&gt; &lt;/DummyClient.Properties.Settings&gt; &lt;/applicationSettings&gt; &lt;/configuration&gt; </code></pre> <p>I hope you are able to find what I have been unable to.</p> <p><strong>Edit #1</strong> I have been able to get the TCP end point up and running by defining a DNS.</p> <p>Here is the new server endpoint definition.</p> <pre><code> &lt;endpoint binding="netTcpBinding" contract="DummyServiceLibrary.IDummyService"&gt; &lt;identity&gt; &lt;dns value="localhost"/&gt; &lt;/identity&gt; &lt;/endpoint&gt; </code></pre> <p>Here is the new client binding definition and client endpoint definition.</p> <pre><code> &lt;netTcpBinding&gt; &lt;binding name="NetTcpBinding_IDummyService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" 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;endpoint address="net.tcp://localhost:8523/dummy" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IDummyService" contract="DummyService.IDummyService" name="NetTcpBinding_IDummyService"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload