I wanted to show the users Name Address (see http://www.ipchicken.com), but the only thing I can find is the IP Address. I tried a reverse lookup, but didn’t work either:
IPAddress ip = IPAddress.Parse(this.lblIp.Text); string hostName = Dns.GetHostByAddress(ip).HostName; this.lblHost.Text = hostName;
But HostName is the same as the IP address.
Who know’s what I need to do?
Thanks. Gab.
Edit of my previous answer. Try (in vb.net):
Dns.resolve appears to be obsolete in later versions of .Net. As stated here before I believe the issue is caused by your IP address not having a fixed name or by it having multiple names. The example above works with Google addresses, but not with an address we use that has a couple of names associated with it.