Get Host name by address : Dns « Socket Network « VB.Net Tutorial






Imports System.Net
Imports System.Net.Sockets


Public Class Tester
    Public Shared Sub Main

        Dim strHostName As String

        Try
            strHostName = Dns.GetHostByAddress("68.129.2.123").HostName
            Console.WriteLine(strHostName)
        Catch exfe As FormatException
            Console.WriteLine(exfe.Message)
        Catch exse As SocketException
            Console.WriteLine(exse.Message)
        End Try
    End Sub
End Class
The requested name is valid and was found in the database, but it does not have the correct associat
ed data being resolved for








22.16.Dns
22.16.1.Dns.GetHostName
22.16.2.Get IP address by domain name
22.16.3.Get Host name by address
22.16.4.Resolve domain in a thread
22.16.5.Get Host Name and IP address