Posted on: 9/10/2015 4:09:16 PM | Views : 782

I am using the following code to return the server ip address. It returns correctly (example: 11.222). I can not use the GetHostByName because it is obsolete. It is recommended to use the GetHostEntry() but it doesnt retrun the ip address numbers like the other function. Any ideas?

string hostname = Dns.GetHostName(); LocationIP = Dns.GetHostByName(hostname).AddressList[0].ToString().Substring(0, 6);

Go to the complete details ...