Error messages like “Socket Exception: No such host is known” refers to issues in the code or configuration of your application. Here is an example error message:
System.Net.Sockets.SocketException: No such host is known
In my case, the root cause was a failure in DNS name resolution. The application was trying to call an API but it is not able to find the hostname.
Your server should be able to access to the DNS server. Additionally, your DNS server should be able to lookup the hostname that is in your code. Troubleshooting steps:
ipconfig /all
in Command Prompt. Fin the IP addresses of the DNS server in the output. Try to ping it.nslookup
. Enter the hostname from your code. The DNS server should be able to reach this hostname.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.