try this
For LAN
string sHostName = System.Net.Dns.GetHostName();
System.Net.IPHostEntry ipE =System.Net.Dns.GetHostEntry(sHostName);
System.Net.IPAddress[] IpA = ipE.AddressList;
for Ip address use IpA[0].ToString()
for Hostname use sHostName
for DNS
try
Request.ServerVariables["REMOTE_HOST"]