Problem with the HOSTS file

L

Lak

Hi,

I have modified c:\winnt\system32\drivers\etc\hosts file
by adding a line for one of the server in our network. I
have saved this file using EditPlus. After this Windows is
not reading the entried from this HOSTS file. Is there any
problem if we edit this file using any editor? I tried
replacing this HOSTS file with HOSTS file from some other
machine and also created a new HOSTS file by entering all
these lines manually using notepad editir but nothing
seems working.

It would be of great help if anybody can pass any pointers
to rectify this problem. I am having Windows 2000
professional with Service Pack 4.

Thanks in advance!
Lak
 
E

Eric McG

Lines preceded with the # symbol are treated as comments.

Verify that this is the first (non-comment) line:
127.0.0.1 localhost

The file must be saved without any file extension.

Some say that the file name must be in uppercase but I haven't found that to be
necessary.
 
G

George Hester

Yeah it's not necessary in Windows 2000. The best test to see if hosts is working is have IIS installed and a hosts file with just this in it: (made in Notepad hosts no extension)

127.0.0.1 localhost

Then try http://localhost and see if you get your IIS server. If so hosts is working.
 
R

Ricardo M. Urbano - W2K/NT4 MVP

George said:
Yeah it's not necessary in Windows 2000. The best test to see if hosts is working is have IIS installed and a hosts file with just this in it: (made in Notepad hosts no extension)

127.0.0.1 localhost

Then try http://localhost and see if you get your IIS server. If so hosts is working.

You could also just ping localhost (w/o having to have IIS installed).
 
C

Charles Otstot

is working is have IIS installed and a hosts file with just this in it:
(made in Notepad hosts no extension)
You could also just ping localhost (w/o having to have IIS installed).


Since I don't know EditPlus, I don't know its default behavior, but in
Notepad, one can easily end up with an unwanted ".txt" extension when
saving the file (I don't know how many times I've done this). If you aren't
showing extensions for known file types, it is very easy to end up with this
result. Once the ".txt" extension is attached to the file, the file is no
longer read by the OS.
I don't know if you've checked this, but it's just a quick, easy and often
overlooked check that came to mind.

Charlie
 
G

Guest

Hi,

Thanks for the information. I think the problem is with
the file type which somehow got registered to files
without any extensions.
I fixed it by editing registry key directly.
The key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\file\DefaultIcon
The value of this should be "%SystemRoot%system32
\url.dll,0"

Thanks!
Lak
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top