I am using Dns.GetHostEntry(IPAddress) to resolve an IP address to an IPHostEntry instance As Asp.net 2.0 suggested. But is throws no such host is known exception. The code is very simple:
IPHostEntry
oIPHostEntry = Dns.GetHostEntry(m_sHost);It works fine if i using
IPHostEntry
oIPHostEntry = Dns.Resolve(m_sHost);which is obsolete according to MSDN. What is wrong with Dns.GetHostEntry, It seems it doesn't work on Windows 2003 server. Can anybody help with this Thank you.

Dns.GetHostEntry not working
cobaltsoft
chainding
Dmitry Bond
dechainelafureurnico
1. As Mike already mentioned the difference between GetHostEntry and GetHostAddresses is that whenever you give an IP address to DnsGetHostEntry it will query the DNS server and try to get the host name for that IP address and then get all the addresses associated with it : For example
string ip = "10.10.10.10"
Dns.GetHostEntry(ip);
If the reverse lookup is successfull it will return the name of the machine and all IP addresses
Dns.GetHostAddress(ip) will return the same Ip address as the name and then return the IP address as the only address in the host entry address list
2. Reverse lookup from command line:
nslookup [ip address]
3. I have no idea how to put information on the DnsServer. You can search the other forums here http://forums.microsoft.com/MSDN/default.aspx SiteID=1 for one where you can post server configuration questions
Mariya