ankursaxena
Programmer
Hi I wanted to get the ip addr of my machine ( not 127.0.0.1) but whatever is assigned in the prvt network but i dont have a dns hocked for that.
Thanks
Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
string strHostName;
strHostName = System.Net.Dns.GetHostName();
IPHostEntry ipEntry = System.Net.Dns.GetHostByName (strHostName);
IPAddress [] addr = ipEntry.AddressList;
for (int i = 0; i < addr.Length; i++)
{
System.Windows.Forms.MessageBox.Show("IP Address: " + i + addr[i].ToString());
}
I'm not connected to a network - the IP address that it picks up for me is the one assigned by my ISP for my internet connection.are you connected to any dns? or is your machine standalone and on no network or a private network?
Uhh, yes you are connected to a network -- the internet. Via your ISP.I'm not connected to a network - the IP address that it picks up for me is the one assigned by my ISP for my internet connection.