Got a new Windows XP box at office. After I added a host-ip mapping in the c:\winnt\system32\drivers\etc\hosts file, I still could not ping to the host. It seemed that the hosts file was ignored.
Ping request could not find host dse-750-test1. Please check the name and tryagain.
I did some research in the internet. The most common solution is to ensure the following registry value is correct, as it may be altered by some software.
Some also mention the ipconfig /flushdns command, and to restart the DNS client service.
Others use filemon and regmon tool to trace. They found the following error message:
OPEN C:\WINDOWS\system32\drivers\etc\hosts ACCESS DENIED NT AUTHORITY\NETWORK SERVICE
After added the user to the security tab (with READ ONLY access), it solved the problem.
However, none of them seems to work in my case.
Finally, I found the solution: rename the hosts file and create a new one; then restart the DNS Client Service. It worked. Modifying the hosts file and restart the service did not work, even a reboot did not.