User1109811461 posted
Hi all expert,
i'm using the following code to obtain DNS alias but getting blank result. Please help to adjust the following code.
Dim hostinfo As IPHostEntry = Dns.GetHostEntry("www.bing.com")
Dim address As IPAddress() = hostinfo.AddressList
Dim [alias] As [String]() = hostinfo.Aliases
Response.Write(("Host name : " + hostinfo.HostName))
Response.Write("<br>")
Response.Write(ControlChars.Cr + "Aliases : ")
Response.Write("<br>")
Dim index As Integer
For index = 0 To [alias].Length - 1
Response.Write([alias](index))
Next index
Response.Write(ControlChars.Cr + "IP Address list :")
For index = 0 To address.Length - 1
Response.Write(address(index))
Next index