Search code examples
.netwcfnetworkingnetwork-programmingwcf-client

A socket operation was attempted to an unreachable host


One customer reported this error at my WCF client connecting to our server service.

"Message: A socket operation was attempted to an unreachable host Type : System.Net.Sockets.SocketException"

From this link http://msdn.microsoft.com/en-us/library/ms740668%28v=vs.85%29.aspx i see:

WSAEHOSTUNREACH 10065 No route to host. A socket operation was attempted to an unreachable host. See WSAENETUNREACH.

WSAENETUNREACH 10051 Network is unreachable. A socket operation was attempted to an unreachable network. This usually means the local software knows no route to reach the remote host.

Is this a network error on customer network? Is it something we can advise customer to do?

WCF Client was able to connect to the server service before and seems that problem disappeared after reboot of machine (or maybe network problem was fixed in the meantime).

Thank you

Adriana


Solution

  • This error indicates that the network was not connected or not configured correctly. It is definitely an error on the client machine, not your server.

    There isn't much you can do to "solve" the problem. Pretty much all you can do is upgrade the client's network drivers and check for connection problems (maybe they're barely within wireless range, or the Ethernet cable is missing its locking tab).