Introduction
Use this code to resolve an IP address (e.g. 192.168.0.1) to a HostName (e.g. myComp.ISPServer1.com).
Code
IPHostEntry dnsHost = new IPHostEntry();
dnsHost = Dns.GetHostByAddress(Request.ServerVariables["REMOTE_ADDR"]);
// you can get the hostname using: dnsHost.HostName
Remarks
Note that in the Dns.GetHostByAddress parameter, you can use any IP address, i.e. it doesn't have to be got via Request.ServerVariables. It can be passed in to a function as a string or whatever.