[thelist] Enable Reverse DNS Lookup for IIS

Casey Crookston CaseyCrookston at savvysherpa.com
Wed Feb 24 14:11:02 CST 2010


I'm trying to enable full DNS lookup including hostname.  Having trouble.  I've followed the instructions here (http://support.microsoft.com/kb/297795) with no luck.  Request.ServerVariables("remote_host") still returns only an IP Address.

I've also tried using DNS.GetHostEntry(IPAddress) and the depricated DNS.GetHostByAddress(IPAddress).  All I ever get back is the  IP Address with no host name.

Dim GetIPHost As IPHostEntry = Dns.GetHostEntry(Request.ServerVariables("remote_addr"))
Dim IPAdrs As IPAddress() = GetIPHost.AddressList
lblData.Text &= "DNS LookUp as : " & "<br />"
For Each ip As IPAddress In IPAdrs
     lblData.Text &= "IP Address: " & ip.ToString() & "<br>"
Next ip
lblData.Text &= "Host Name is: " & GetIPHost.HostName

IIS 6.0, Windows Server 2007 Server Pack 2, .NET 2.0

I'm out of ideas, but the boss expects me to get it working. Are there any tricks I've not tried?


More information about the thelist mailing list