10

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

Adrya
  • 3,427
  • 8
  • 31
  • 29

3 Answers3

3

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).

Stephen Cleary
  • 437,863
  • 77
  • 675
  • 810
  • I am able to connect to internet but i am getting this error while sending email in c# code. i am having windows 10 what should i do ? – Heemanshu Bhalla Jan 09 '20 at 10:41
  • @HeemanshuBhalla: I don't know. I recommend reducing the code to a reproducible example and posting your own question. – Stephen Cleary Jan 09 '20 at 13:45
  • Okay I will do it. – Heemanshu Bhalla Jan 09 '20 at 14:59
  • 1
    I found that this error occurs in the system during development. When you open local site being connected to one network. Then you change the network, e.g. disconnect from VPN, and try to open local site again => you get this error. All you need is just to connect to the previous network, i.e. restore network environment. Or reboot the system. – Pal Oct 25 '22 at 12:15
1

You can help your customers or FAEs to develop an SOP for identifying connectivity issues. Say, pinging the server IP from client machine, do an ipconfig and see if the machine's network adapter is up or not.

Peon the Great
  • 1,289
  • 1
  • 10
  • 17
0

For me, it was due to an internet connection issue while executing a python script.

Exception
  • 789
  • 4
  • 18