System.Net.Dns.GetHostAddresses
By the way, you should pass the hostname as an argument, so maybe try the following:
System.Net.Dns.GetHostByAddress(System.Net.IPAddress.Parse(System.Web.HttpContext.Current.Request.UserHostName)).HostName;
And if all else fails, just do it the old school way:
Response.Write(Request.ServerVariables["LOCAL_ADDR"]);
alex
source share