Author: rajitha777 | Posted on: 7/14/2008 2:12:51 AM | Views : 449

HOw to get the IP address of the server using asp.net coding

M using Following code to get IP Address . m getting local IP address. like 192.168.1.48

But i want to get Server IP address, by that we can know region ie. country,city,like

please send me the code for that.
public void UseDNS()
{
string hostName = Dns.GetHostName();Response.Write("Host Name = " + hostName);
IPHostEntry local = Dns.GetHostByName(hostName);
foreach (IPAddress ipaddress in local.AddressList) Go to the complete details ...