I am currently building a new FTP automation for Navision.
During this I discovered that Dns.GetHostEntry is not always stable.
So I did some testing. Here are some of the results:
Dns.GetHostEntry(localhost) Ok Dns.GetHostEntry(127.0.0.1) Ok Dns.GetHostEntry(192.168.1.147) No Such Host is Known
The funny side is that its all to the same ftp server.
It seams, that Dns.GetHostEntry often throws the exception (No Such Host is Known).
So, what to do? Well I have chosen to use the command Dns.GetHostAddresses instead of Dns.GetHostEntry.
The difference between GetHostEntry and GetHostAddresses is that GetHostEntry will attempt a DNS reverse resolve before giving you the IP address back, where as GetHostAddress just returns the IP address.