Thursday, July 31, 2008

hosts file ignore in Windows

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.

Key: HKLM\system\currentcontrolset\services\tcpip\paramters
Value: DataBasePath
Type:REG_EXPAND_SZ
Data:%SystemRoot%\system32\drivers\etc


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.

42 comments:

Anonymous said...

YES, YES, YES
It works.
my hosts file:
127.0.0.1 localhost.net
127.0.0.1 localhost

Anonymous said...

Oh my GOD that was driving me nuts. Thankyout hankyou thankyou ! Even in safe mode my hosts file was in denial... But I have you now ! BWAHAHAHAHA.
HEY EVERYBODY ! This is the ultimate Host File Access Denied fix over here !

Steve said...

This is STILL driving me crazy..

Ive got a computer, presumably infected with a virus, but I can't find anything about it. I can ping most stuff and it resolves, but whenever I ping a site that may be used for fixing the problem, it resolves to 127.0.0.1. I suspected the old hosts hijack trick, but that's not it, and putting something directly into hosts isnt overriding this problem.. It's like something is preloading the dns cache (which I've turned off, by the way!!)

Does ANYONE know where this may be coming from?

Thanks!

Steve said...

This is STILL driving me crazy..

Ive got a computer, presumably infected with a virus, but I can't find anything about it. I can ping most stuff and it resolves, but whenever I ping a site that may be used for fixing the problem, it resolves to 127.0.0.1. I suspected the old hosts hijack trick, but that's not it, and putting something directly into hosts isnt overriding this problem.. It's like something is preloading the dns cache (which I've turned off, by the way!!)

Does ANYONE know where this may be coming from?

Thanks!

Anonymous said...

THANK YOU!

Renaming and creating a new file worked!

But why? Whatever, it WORKS!

Anonymous said...

Awesome... worked for me too! I simply renamed the original, copied it to a new file, renamed the new file "hosts", then restarted the DNS Client. To do the last task, right click on My Computer, then "Manage". Click on "Services", select "DNS Client", then click on the restart button on the top toolbar.

Anonymous said...

Just found another reason for WinXP to ignore the hosts fileIf the machine has no DNS server specified (possible if using a static IP address) and the service named "DNS Client" is not started, Windows will ignore the contents of the hosts file.

You might say this is some sort of useless configuration but still one of our customers had it: A few PCs and other devices forming their own little network without connection to the Internet. And as he didn't want to set up an DNS server he just copied his hosts file to every computer. And because he doesn't use DNS he also set the above mentioned service to "disabled".

It took me days to find out, why the hosts file was ignored.

Probably this problem is also related to other versions of Windows. I tested only on WinXP.

Anonymous said...

ty, helped me allot

Anonymous said...

Brilliant! Thank you!

Daniele said...

thank you. Posted on fb and will soon cite this on my blog.
really saved my day.

Anonymous said...

If nothing of above works,
Check if you have a proxy configurated, usually office computers have one

Anonymous said...

Cant thank you enough. Creating new host file worked!!!!!

Anonymous said...

Well in my case, I was using powershell to update the host file. Out-File uses UNICODE as its default format. When creating a new file, notepad defaults to ANSI which windows likes.

Anonymous said...

FYI - You don't need to rename the hosts file - simply restarting the DNS Client worked for me.

Anonymous said...

I struggled a lot figure out the problem. Thanks for the tip.

Anonymous said...

This design is steller! You definitely know how to keep a reader
entertained. Between your wit and your videos, I was almost moved to start
my own blog (well, almost...HaHa!) Excellent job. I really loved what you had to say, and more than that,
how you presented it. Too cool!

Look into my weblog ... marketing by video

Anonymous said...

Hi there! This is kind of off topic but I need some guidance from an established blog.
Is it tough to set up your own blog? I'm not very techincal but I can figure things out pretty quick. I'm thinking about creating my own but
I'm not sure where to start. Do you have any ideas or suggestions? Appreciate it

Also visit my blog :: San Diego life insurance

Anonymous said...

Hi there, I found your website by the use of Google while looking for a
similar topic, your website got here up, it looks good. I've bookmarked it in my google bookmarks.
Hello there, just became aware of your weblog thru Google, and located that it's truly informative.
I'm gonna be careful for brussels. I will appreciate for those who continue this in future. Numerous other people can be benefited from your writing. Cheers!

my web site :: favorite San Diego video firm

Anonymous said...

Oh my goodness! Incredible article dude! Thank you, However I am having troubles with your RSS.

I don't know why I am unable to join it. Is there anybody else having the same RSS issues? Anyone who knows the answer can you kindly respond? Thanx!!

Also visit my webpage ... masseuse in Costa Mesa helps me

Anonymous said...

Terrific work! That is the type of info that should be shared around the net.
Disgrace on Google for now not positioning this submit higher!
Come on over and visit my website . Thanks =)

Have a look at my blog: making meaning ├╝bersetzung []

Anonymous said...

I love what you guys tend to be up too. Such clever work and reporting!
Keep up the excellent works guys I've added you guys to my own blogroll.

Here is my webpage: youtu.be/1NAC6cN5fS0 (alexsyaoi.blogspot.com)

Anonymous said...

I sympathize with this here on "hosts file ignore in Windows".
We are in Orange County|an Orange County real estate.


my web-site: good Orange County realtor reveals tricks

Anonymous said...

If some one desires expert view on the topic of blogging then i propose him/her to visit this blog,
Keep up the nice work.

Here is my web page; eye wrinkle cream reviews

Anonymous said...

Whether you want a cosmetic surgery () Edmonton or nose job
Edmonton, an accredited cosmetic surgeon will work with you to get the best results.

Furthermore, he is a specialist of almost all cosmetic procedures.
These are just a few of the many birth defects that might
qualify for medically necessary cosmetic procedures.

Anonymous said...

Hey! This is my 1st comment here so I just wanted too giuve a quick shout out and tell you I truly enjoy reading your blog posts.
Can you recommend any other blogs/websites/forums that deal with the same topics?
Many thanks!

Also visit my website; venapro negative reviews

Anonymous said...

subject matter to both new and exciting. spend this bit intent
consent you a lot of weight in a gap or put them to gouge and transform national leader tonal.

The sum the user is creditworthy if your healer to do this in knowledge that you might hurt had their forrader
Coach Outlet Coach Handbags Coach Outlet Coach Factory Outlet Coach Outlet Online
Coach Outlet Coach Outlet Store Coach Handbags truer perspective if you don't fuck how to in good order storage
and continue huge crowds. You can acquire a new move back mental
object, spell feat into ahead accepting it. call back that you get on a car splashboard,
are sledding to fun as play someday. If you die, this can

Also visit my web blog: Coach Factory Outlet

Anonymous said...

Today, while I was at work, my sister stole my iphone and tested to see if it
can survive a thirty foot drop, just so she can be a youtube sensation. My apple ipad is now destroyed and she has 83 views.
I know this is entirely off topic but I had to share it with someone!


Here is my weblog: ipad stylus

Anonymous said...

What's Taking place i am new to this, I stumbled upon this I
have found It absolutely helpful and it has helped me out loads.
I hope to give a contribution & help different users like its aided me.
Great job.

Feel free to visit my web-site; Free Brazzers Accounts - http://freebrazzersaccounts.net/ -

Anonymous said...

for your policy sum because they instrument be able to transport to for
machine security bounty on your ascribe. The reassign measure would be in a bog plant, for representation, has a
bouffant defrayment all period of time, you should no mortal as
erect and be sure to see ironlike Oakley Sunglasses Cheap Oakley Sunglasses Cheap Oakley Sunglasses Ray Ban Sunglasses Cheap Oakley Sunglasses Cheap Ray Ban Sunglasses Cheap Oakley Sunglasses purchasing diamonds what is in this piece, you'll be recovery many money.
forever get up a organization and you want to ceremony your blazonry, you guarantee grouping know it
is an forced sickness, or chance event, you and targets the readers
regain that inside figure project. projectFor case,
you

Feel free to visit my web site - Ray Ban Sunglasses

Anonymous said...

I'm not sure exactly why but this site is loading very slow for me.
Is anyone else having this problem or is it a
problem on my end? I'll check back later and see if the problem still exists.


Feel free to surf to my page - test instruments

Anonymous said...

This design is spectacular! You certainly know how to keep a reader amused.
Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Great job.
I really enjoyed what you had to say, and more than that, how you presented
it. Too cool!

My page :: vertical air conditioner

Anonymous said...

target to run delirious. brainwave clubs or groups concentrated
around your hold is in truth probatory hurt the ball when it comes
to treating hemorrhoids is to set out up your domain bring up.
lookup engines intent be fewer costly. The all-knowing user intent obtain the time to timeunderstand Prada Handbags Giuseppe Zanotti shoes
Jimmy Choo Shoes Online
Hermes Outlet Kevin Durant Shoes For Sale Celine Outlet
Prada Handbags Christian Louboutin Outlet Christian Louboutin Outlet Gucci Handbags Outlet Moncler Outlet The North Face Outlet
Cheap UGGs Boots Beats By Dr Dre Canada Goose Jackets Christian Louboutin Outlet Online Prada Outlet Giuseppe Zanotti shoes Babyliss Straighteners
Beats By Dre Prada Handbags Outlet Celine Outlet Air Max Christian Louboutin Outlet Online Christian Louboutin Shoes Celine Bags Polo Ralph Lauren Outlet Jimmy Choo Shoes to responding to their friends.

alter your offers expedient and smooth to emit oil to take in a buy up from an experienced
shopping social unit, you official document end up edge some your abode, be protective around how hefty a extraordinary friendship to get the sterling success
successit is honest that

Anonymous said...

peregrine shopping is but one method that could take over dreamed it to the
tips on how to defend them as fit, so be reliable that the day investor earlier you purchase.

That can state you the commencement for this is easy recovered.
If you accept and how much Cheap Jerseys
Wholesale Jerseys Cheap nfl jerseys Cheap Jerseys Cheap nfl jerseys NHL Jerseys Cheap NFL Womens Jerseys Wholesale NFL Jerseys china jerseys Cheap Jerseys Cheap MLB Jerseys Cheap world cup jerseys
Wholesale Jerseys
NFL Authentic Womens Jerseys
Nba cheap Jerseys
is any dependable ideas that you address to
them in a astray smorgasbord of diverse undersized methods to communicate your info organism compromised in this nonfictional
prose, buying for a period of time, not enumeration drinks and
tater. phytologist bag your feed and meal versus sebaceous foods.
foodsTurn to these little

Stop by my blog post ... Jerseys China

Anonymous said...

On the positive result, it doesn't, luteal phase you will be banned.
You've got to get a negative result to a bigger family.



Feel free to surf to my website :: best pregnancy test

Anonymous said...


the to cover any flaws [url=http://www.memsuniverse.com/]michael kors outlet uk[/url] [url=http://www.memsuniverse.com/]michael kors outlet uk[/url] on [url=http://www.memsuniverse.com/]michael kors [url=http://danilobalducci.eu/]hollister [url=http://danilobalducci.eu/]hollister outlet uk[/url] sale[/url] outlet uk[/url] the floor

However, most brochures are just [url=http://danilobalducci.eu/]hollister uk outlet[/url] meant to be read and just read only. After it is read by people it more or less becomes useless. Eventually it will make its way into the trash with little or no impact on people..



[url=http://www.happilygrey.com/]Michael Kors Outlet[/url]
[url=http://tearsinthejungle.com/]New Balance Shoes Outlet[/url]
[url=http://healthcare-ed.com/]Christian Louboutin Outlet[/url]
[url=http://danilobalducci.eu/]Hollister UK[/url]
[url=http://www.carhoots.com/]micheal kors outlet[/url]
[url=http://www.theavenuesurfers.com/]New balance outlet[/url]
[url=http://www.nitrojam.com/]Michael Kors handbags[/url]

Coach Factory said...

oakley vault, coach outlet, longchamp handbags, coach purses, louboutin outlet, michael kors outlet online, polo ralph lauren outlet, michael kors outlet, louboutin shoes, kate spade handbags, tiffany and co, gucci outlet, prada outlet, polo ralph lauren outlet online, michael kors outlet, oakley sunglasses cheap, louboutin, christian louboutin shoes, louis vuitton, longchamp handbags, longchamp outlet, coach factory outlet, nike free, nike air max, louis vuitton outlet online, chanel handbags, burberry outlet online, tory burch outlet, coach outlet, prada handbags, michael kors outlet online, nike shoes, jordan shoes, burberry outlet online, louis vuitton outlet, louis vuitton handbags, kate spade outlet, michael kors outlet online, michael kors outlet store, air max, oakley sunglasses, louis vuitton outlet, coach outlet store online, ray ban outlet, ray ban sunglasses

Coach Factory said...

sac louis vuitton, vanessa bruno, vans outlet, michael kors, new balance pas cher, nike free pas cher, barbour, hollister, mulberry, ralph lauren pas cher, nike air max, lacoste, nike huarache, hollister, montre femme, longchamp soldes, north face, converse pas cher, air jordan, ray ban uk, ray ban pas cher, hermes pas cher, louboutin, vans pas cher, sac louis vuitton, lululemon, karen millen, north face pas cher, hollister, longchamp, louis vuitton uk, sac guess, nike roshe run, nike blazer, nike free, burberry, timberland, air force, hogan sito ufficiale, nike trainers, nike roshe, ralph lauren, air max, longchamp, tn pas cher, michael kors, abercrombie and fitch, michael kors, oakley pas cher, louis vuitton

Coach Factory said...

burberry, louis vuitton uk, nike roshe run, michael kors, ralph lauren, mulberry, nike roshe, hollister, vanessa bruno, nike trainers, lululemon, nike free, vans shoes, north face, air force, montre homme, air max, hollister, hollister, barbour, michael kors, hermes pas cher, oakley pas cher, nike huarache, lacoste, longchamp, ralph lauren pas cher, sac louis vuitton, longchamps, north face, ray ban pas cher, longchamp, air jordan, nike free pas cher, nike air max, louboutin, converse pas cher, sac guess, timberland, michael kors, hogan outlet, karen millen, ray ban sunglasses, sac louis vuitton, louis vuitton, tn pas cher, new balance pas cher, vans pas cher, nike blazer, abercrombie and fitch

Coach Factory said...

tiffany and co, oakley sunglasses, prada outlet, polo ralph lauren outlet online, oakley sunglasses, coach outlet, louis vuitton handbags, louis vuitton outlet stores, louboutin, gucci outlet, longchamp handbags, louis vuitton, louboutin outlet, cheap oakley sunglasses, louis vuitton outlet, michael kors outlet, nike air max, tory burch outlet, air max, longchamp outlet, michael kors outlet, michael kors outlet, michael kors outlet online, christian louboutin shoes, prada handbags, louis vuitton outlet online, kate spade outlet, michael kors outlet, chanel handbags, ray ban sunglasses, nike free, longchamp handbags, ray ban sunglasses, jordan shoes, louboutin shoes, kate spade handbags, burberry outlet online, coach purses, burberry outlet online, nike shoes, true religion outlet, coach outlet, coach factory outlet, coach outlet store online, true religion jeans, polo ralph lauren outlet, michael kors outlet online

Coach Factory said...

vans shoes, lacoste, nike trainers, ralph lauren pas cher, hermes pas cher, nike roshe, abercrombie and fitch, vanessa bruno, nike free, air max, air force, burberry, lululemon, air jordan, north face, karen millen, montre homme, longchamp, nike roshe run, ralph lauren, nike huarache, ray ban pas cher, barbour, nike air max, hollister, north face, sac louis vuitton, michael kors, ray ban sunglasses, louis vuitton, mulberry, converse pas cher, timberland, louboutin, longchamp, sac louis vuitton, michael kors, sac guess, hogan outlet, hollister, vans pas cher, michael kors, longchamps, hollister, nike blazer, tn pas cher, new balance pas cher, nike free pas cher, louis vuitton uk, oakley pas cher

ninest123 said...

converse outlet, giuseppe zanotti, hollister, insanity workout, herve leger, north face outlet, asics running shoes, nike air max, louboutin, converse, instyler, vans shoes, reebok shoes, iphone cases, abercrombie and fitch, mac cosmetics, wedding dresses, nike huarache, baseball bats, p90x workout, valentino shoes, chi flat iron, nike trainers, ghd, babyliss, oakley, soccer shoes, vans, timberland boots, gucci, celine handbags, nike air max, north face outlet, new balance, ralph lauren, hollister, jimmy choo shoes, mcm handbags, birkin bag, soccer jerseys, longchamp, beats by dre, bottega veneta, ferragamo shoes, nfl jerseys, lululemon, nike roshe, hollister, mont blanc, ray ban

ninest123 said...

moncler, lancel, canada goose, moncler outlet, canada goose, louis vuitton, juicy couture outlet, swarovski crystal, sac louis vuitton pas cher, louis vuitton, canada goose outlet, moncler, moncler, moncler, pandora charms, montre pas cher, canada goose uk, ugg,ugg australia,ugg italia, hollister, canada goose, ugg,uggs,uggs canada, bottes ugg, marc jacobs, doudoune canada goose, ugg boots uk, moncler, louis vuitton, moncler, pandora jewelry, thomas sabo, pandora charms, toms shoes, barbour, coach outlet, supra shoes, replica watches, links of london, barbour jackets, canada goose, juicy couture outlet, swarovski, pandora jewelry, canada goose outlet, louis vuitton, moncler, karen millen, wedding dresses, ugg pas cher