title: Dns.GetHostEntry error conditions and resolution methods
body: <p>I have a very specific problem concerning Dns.GetHostEntry:</p>
  
  <p>A service uses Dns.GetHostEntry to retrieve all IP Adresses of a host, using the name of of the host. This has always worked fine. 
  At a specific customer, Dns.GetHostEntry throws the "no such host is known" error when querying specific hosts. The problem only occurs when trying to resolve hosts that are on a different domain than the machine the service is installed on. The service has worked for quite some time, but recently is stopped working, throwing the "no such host is known" error (sadly, no stack trace is available). Nslookup works though, no problems there. 
  The service in question is written in VB.NET, targetting the .NET Framwork 2.0.</p>
  
  <p>The comments in the MSDN entry for .NET 3.0 (<a href="http://msdn.microsoft.com/en-us/library/ms143998(v=VS.85).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms143998(v=VS.85).aspx</a> indictate that there may be a problem with the reverse DNS entries for the hosts, but I was not able to reproduce the problem on a test network, even with all reverse lookup zones deleted (there are more comments for other .NET Versions, all having similiar problems). [EDIT:] Even deliberatly addind a wrong PTR record does not make the problem occur on my test machine.</p>
  
  <p>[EDIT2:] The only thing that made the error come up was disconnecting the network adapter, and thereby making the DNS Server unavailable, even though the forward resolving still worked due to caching.</p>
  
  <p>So, my questions are: </p>
  
  <ol>
  <li>Under which conditions does GetHostEntry throw this specific error? </li>
  <li>Which resolution methods does it use? If I'm not mistaken it uses the unmanaged WinSock function getnameinfo (<a href="http://msdn.microsoft.com/en-us/library/ms738532(v=vs.85).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms738532(v=vs.85).aspx</a>),: "Name resolution can be by the Domain Name System (DNS), a local hosts file, <strong>or by other naming mechanisms".</strong></li>
  <li>Any ideas why this suddenly fails for machines on the other domain (but not for machines on the same domain)?</li>
  </ol>
  
  <p>Thanks and best regards,
  cun83</p>