28 Sept 2011

VB.NET: Retrieve IP and resolve to hostname (aspx)

Our company upgraded to Windows 7 so this is what I had to do in order to retrieve the host computername

Dim host As System.Net.IPHostEntry
host = System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST"))
Dim strComputerName As String = host.HostName

No comments:

Post a Comment