WCF EndpointNotFoundException while dialing

shreyansh raj 0 Reputation points
2025-08-28T09:56:00.3766667+00:00

System.ServiceModel.EndpointNotFoundException: Could not connect to the remote endpoint 1888 3199479

Server stack trace:

  at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)

  at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)

  at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
```   Exception rethrown at [0]:

```powershell
  at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

  at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
```Inner Exception: 

System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party 1888 3199479 did not respond 

   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

   --- End of inner exception stack trace ---

Developer technologies | Windows Presentation Foundation
{count} votes

1 answer

Sort by: Most helpful
  1. Varsha Dundigalla(INFOSYS LIMITED) 2,700 Reputation points Microsoft External Staff
    2025-08-29T09:01:07.2433333+00:00

    Thank you for reaching out. Please find the answer below.

    The System.ServiceModel.EndpointNotFoundException with an inner SocketException (10060) typically occurs in WCF applications when the client cannot establish a connection to the remote service. This is a network-level failure, meaning the client tried to reach the server but got no response within the allowed time. The most common reason is that the endpoint (the address and port where the service is hosted) is either incorrect, unreachable, or not actively listening.

    Even if the service is running, the error can still occur due to several other factors. For example, the service might not be listening on the expected port, or the endpoint address might be misconfigured. Firewalls or network restrictions could block the connection. Additionally, mismatched WCF bindings between client and server, or infrastructure components like load balancers not routing traffic correctly, can also cause this issue. Timeouts due to server overload or slow responses are another possibility.

    Comprehensive Troubleshooting Steps

    Here’s a checklist that covers all the major areas:

    1. Verify the Endpoint Address
    • Ensure the URI in your client configuration is correct.
    • It should be a valid format like http://hostname:port/ServiceName or net.tcp://hostname:port/ServiceName.
    • Avoid placeholders or malformed values like 1888 3199479.
    1. Confirm the Service is Running
    • Check that the WCF service is deployed and actively running.
    • If hosted in IIS, ensure the application pool is started.
    • If self-hosted, verify the host application is running.
    1. Check if the Port is Listening
    • Use tools like netstat -an or PowerShell to confirm the service is listening on the expected port.
      • Example: netstat -an | findstr :8080
    1. Test Network Connectivity
    • From the client machine, try: ping hostname
    • If these fail, there may be a network or DNS issue.
    1. Review Firewall and Security Settings
    • Ensure firewalls on both client and server allow traffic on the service port.
    • Check antivirus or endpoint protection software that might block connections.
    1. Validate WCF Configuration
    • Ensure the client and server use compatible bindings (basicHttpBinding, netTcpBinding, etc.).
    • Mismatched bindings will prevent communication even if the endpoint is correct.
    1. Check for Timeouts and Server Load
    • If the server is under heavy load or slow to respond, increase timeout settings in the client config.
      • Example: <binding openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" />
    1. Consider Load Balancers or Reverse Proxies
    • If your service is behind a load balancer or proxy, ensure it routes traffic correctly.
    • Check for sticky sessions, health checks, and port forwarding rules.
    1. Enable Logging and Diagnostics
    • Turn on WCF tracing and message logging to capture detailed error information.
    • This helps identify whether the issue is on the client, network, or server side.

    Let us know if you need further help with this. We'll be happy to assist.

    If the issue is resolved, Kindly mark this as answered.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.