question

AngelosErilus-9723 avatar image
0 Votes"
AngelosErilus-9723 asked DuaneArnold-0443 commented

Unable to connect client to service hosted on another computer. Keep get EndpointNotFoundException

My plan is to host a WCF Service on one machine hosted as a Windows Service, and have a instance of the client run on multiple computers that access the service.

I keep getting EndpointNotFoundException, when launching the client from another computer.

When I looked at wireshark the sync message is sent to the service ip port but never acknowledgded. Instead tcp retransmission messages are sent.

I have firewall rules already for the ports, and verified through netstat that the port is opened and listening. Below are my service configurations

service App.config:

<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="tcpConfig">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="ControlService.CCService">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="tcpConfig" contract="ControlService.ICCService">
<identity>
<dns value="mainPC24"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://192.168.1.135:58600/ControlService/" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>


client app.config

<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_ICCService">
<security mode="None">
<transport sslProtocols="None" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://192.168.1.135:58600/ControlService/"
binding="netTcpBinding" bindingConfiguration="NetTcpBinding_ICCService"
contract="CS.ICCService" name="NetTcpBinding_ICCService">
<identity>
<dns value="mainPC24" />
</identity>
</endpoint>
</client>
</system.serviceModel>


The setup works great on the same machine but doesnt on a seperate machines. I have spent the last month reading forums and no solution has worked for my situation.

I have the following in my Service class: [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single, UseSynchronizationContext = true)]

I have the following in my Service Interface: [ServiceContract(CallbackContract = typeof(ITCCServiceCallback), SessionMode = SessionMode.Required)]

windows-wcf
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AngelosErilus-9723 , First of all, you must ensure that the network between the client and the server is interoperable, and the client can access the server through 192.168.1.135. Secondly, make sure that 192.168.1.135 is the IP address of the server.

0 Votes 0 ·

yes they are interoperable and IP address is correct.

0 Votes 0 ·

Sounds like a firewall problem to me blocking the port.

0 Votes 0 ·

0 Answers