GetHostEntry returns local computername instead of DNS name

  • Thread starter Thread starter MrBeatnik
  • Start date Start date
M

MrBeatnik

Guest
Hi,

  • I have a computer with a computername of "COMPUTERa".
  • It has a DNS entry with a name of "DNSa".


If I run DNS.GetHostEntry(ipAddress_to_that_computer) on that computer, it comes back with "COMPUTERa".

If I run the same command (same IP address) on another computer, if comes back with "DNSa".


It appears that the code realises the IP is for the local machine, and queries the computername instead of the DNS name.

My HOSTS file is empty. DNS has never had "COMPUTERa" as a record, so DNS cache is not a factor.


This might be expected behaviour if you query your own IP address. However I need to check the DNS record. How can this be achieved?

Continue reading...
 
Back
Top