Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: "Unable to login : Server is unavailable" Problem? #7020

    This exception message says you’re trying to connect to the same host ( ), while you’re stating that your server is running on a different host. This represents a ‘loopback’ . It allows the computer to communicate with itself via network protocol .

    Dns.GetHostEntry(IPAddress.Loopback).HostName returns the host name of your machine. When you pass a host name to TcpClient , it will resolve it to one or more IP addresses using Dns.GetHostAddresses(hostName) . This includes the public and local IP addresses of your machine (e.g., but not (loopback address). So your client is trying to connect to any of the non-loopback addresses of your machine, while your server is listening only on the loopback address . So, no connection can be established. The solution to this problem is that connect to the same end point your server is listening on.

Viewing 1 post (of 1 total)