DNS Alias RRS feed

  • Question

  • 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(ControlChars.Cr + "Aliases : ")

    Dim index As Integer
    For index = 0 To [alias].Length - 1
    Next index

    Response.Write(ControlChars.Cr + "IP Address list :")

    For index = 0 To address.Length - 1
    Next index

    Sunday, June 24, 2018 9:37 AM

All replies

  • User753101303 posted


    Not a DNS expert but I ,believe it is the expected result according to https://network-tools.com/nslook/

    My understanding is that you would need to test with a name that returns more than a single CNAME record ???

    Monday, June 25, 2018 7:20 AM
  • User1109811461 posted


    The result was not accurate as no dns alias appear, some of the code is taken from Microsoft web site, any one else can help me to resolve this issues..?


    Tuesday, June 26, 2018 4:51 AM