I created 2 WCF endpoints, the service endpoint resides on a desktop app(with IP address 10.8.20.175); the client endpoint resides on a web-hosted application.
this is service endpoint config
<services>
<service behaviorConfiguration="NotificationServiceBehavior"
name="NotificationService">
<endpoint address="" binding="netTcpBinding" contract="INotificationService" />
<endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:3337/NotificationService" />
</baseAddresses>
</host>
</service>
</services>
and this is client endpoint config
<system.serviceModel>
<client>
<endpoint address="net.tcp://10.8.20.175:3337/NotificationService"
binding="netTcpBinding" contract="INotificationService"
name="NetTcpBinding_INotificationService" />
</client>
<bindings>
<netTcpBinding>
<binding sendTimeout="00:10:00" maxReceivedMessageSize="1000000" name="NetTcpBinding_INotificationService"/>
</netTcpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
notice that in the endpoint address, I put the actual IP address of service endpoint. when I tested the communication between service endpoint and client endpoint on localhost, that address was localhost:3337 and the communication was good. now when I deploy the endpoint I got the following errors:
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:10:00'.
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
The log says that the connection was forcibly closed by the remote host, that means the client endpoint actually sent request and it reached the service endpoint? I am confused at this point. I am not sure if the client endpoint can reach the service endpoint.
btw, from the client endpoint machine, I can ping the machine of service endpoint and also can do telnet on the port 3337 to the remote machine.