Dns.GetHostEntry is not giving me a good IP to pass to IPEndPoint function in my domain
- by Beach Miles
My c# code from my asynchronous socket client to get the address of my socket server.
string testServerIP = "192.168.0.1";
IPHostEntry ipHostInfo = Dns.GetHostEntry(testServerIP); //time server address
IPAddress ipAddress = ipHostInfo.AddressList[0];
IPEndPoint remoteEP = new IPEndPoint(ipAddress, port);
I get the following error message from the above code.
CheckServerReconnect:Cant connect to 192.168.0.1 The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for