in Education by
I inherited code that makes the call to Dns.GetHostEntry("10.1.12.180") (or by using the dns of the machine) and the IPHostEntry that is returned has a different ip address "10.100.160.18" If I run the code on the same subdomain (10.1.12) it works. Another developer using WireShark said he doesn't see the call being made and that I must be overriding the GetHostEntry call to return that specific address (we used to have that address on the network). I'm not overriding the call. I know that I can circumvent the issue by using IPAddress.Parse() since I do have the correct ip address. Any ideas why it would return the incorrect ip? It used to work. I have checked with IT and they don't have any mappings to the incorrect IP address. The only difference it that the machine with ip address 10.1.12.180 was updated to windows 10 (from Windows 7). I have isolated the call so that I have a project that just makes the Dns.GetHostEntry() call. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
IPHostEntry returns a list of addresses, not a single IP address. You should iterate IPHostEntry.AddressList to see all of them. See here for example usage of Dns.GetHostEntry. Also be aware Windows can override DNS lookups via the hosts file. This is, unfortunately, a common way to hijack DNS lookups on a specific machine.

Related questions

0 votes
    What is the well-known port address number used by dns to serve requests? Select the correct answer from above options...
asked Nov 27, 2021 in Education by JackTerrance
0 votes
    IP address space can be applied to _____________. A. Virtual networks B. Subnets C. None of the options D. All the options...
asked Nov 21, 2022 in Education by JackTerrance
0 votes
    I've installed VisualSVN on my Windows Server 2008. I have several IP addresses on this server, but I ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I've installed VisualSVN on my Windows Server 2008. I have several IP addresses on this server, but I ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 10, 2022 in Education by JackTerrance
0 votes
    What does local IP address start with? (a) 10.X.X.X (b) 172.X.X.X (c) 192.168.X.X (d) ... Java Server Technologies & Servlet of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    What happens if IP Address of host cannot be determined? (a) The system exit with no message (b) ... & Servlet of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    I am developing a Ruby on Rails application by using Ruby v1.8.7 . My question is more about Ruby ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    What would be the network address of the IP address 20.12.180.17 with subnet mask 255.255.255.224? 20.12.180. ... .192 255.12.180.224 Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    In IP address, IP is abbreviated as __________ (a) Internet Program (b) Internet Protocol (c) Intuition Programs ... Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
0 votes
    The logical port is associated with the type of protocol used along with the IP address of the host. (a) True ... Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
0 votes
    __________ masks your IP address. (a) Firewall (b) Antivirus (c) VPN (d) Incognito mode I got this question ... Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
0 votes
    Attackers commonly target ____________ for fetching IP address of a target or victim user. (a) websites (b) web ... Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
0 votes
    Even our emails contain the IP address of the sender which helps in the enumeration. We can get this IP from ... Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
...