When i execute the below mentioned code in .NET 1.1 i get the following error message "A socket operation was attempted to an unreachable host" but when i execute the same code in .NET 2.0 it executes successfully.
Please help me in this regard.
Thanks,
Govind
Code:
main_sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
main_ipEndPoint = new IPEndPoint(Dns.GetHostByName(server).AddressList[0], port);
try
{
main_sock.Connect(main_ipEndPoint);
}
Thanks,
Govind
Comment