A socket operation was attempted to an unreachable host

陌路散爱 提交于 2020-01-01 09:55:24

问题


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


回答1:


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




回答2:


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.




回答3:


This problem is because the same port number is accessed by one more node in web config. Change it . Happy Coding.



来源:https://stackoverflow.com/questions/5164466/a-socket-operation-was-attempted-to-an-unreachable-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!