#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Posts
    853
    Rep Power
    11

    DNS giving wrong IP address!


    ok here is the .net code

    Code:
     IPHostEntry host = Dns.GetHostEntry(hostName);
    
                // Addres of the host.
                IPAddress[] addressList = host.AddressList;
    and everytime i am getting a wrong ip
    can someone tell me what might be happening
    Is there anything i can do to get the correct ip address?
    Thanks
    Contact info:
    Primary email: advanced.programmer@gmail.com
    MSN/email: superprg@hotmail.com
    AIM: superprg
  2. #2
  3. Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Sep 2007
    Location
    outside Washington DC
    Posts
    2,642
    Rep Power
    3699
    Try it using shell commands.
    dig or nslookup

    see what you get.

    Check the hosts file, which on Windows lives someplace like
    <osdir>/system/32/drivers/etc/

IMN logo majestic logo threadwatch logo seochat tools logo