http://localhost not resolving on Vista Ultimate

J

John Kotuby

Hi all,
I have been working on transferring my development environments to a new
Vista ultimate machine (from XP) and am running into difficulties. After
patching both SQL Server 2005 and VS 2005, I am now attempting to test my VB
Web Site application the same way I did in XP. IIS is running and in IIS
Management I see the default website in the correct spot, yet
http://localhost/ is not resolving. Has anyone else run into this problem
and have a fix?

Thanks,,,
 
J

Juan T. Llibre

The standard way to resolve that is to find the hosts file
and map your loopback address ( 127.0.0.1 ) to "localhost".

There's an issue connected to doing that on Vista.

The hosts file is considered a system file by Vista.
You have to first take ownership of it then grant yourself full control.

These are the two commands that you need to run from an elevated command prompt.
(Right click "command prompt" and choose "Run as Administrator") :

1.
takeown /f c:\windows\system32\drivers\etc\hosts

2.
icacls c:\windows\system32\drivers\etc\hosts /grant yourusername:f

If you installed to a drive other than "c:", modify accordingly, of course.

Now you can open the file with notepad, insert this line and save the hosts file
( make sure it doesn't acquire a .txt extension ) :

127.0.0.1 localhost

If that doesn't fix it, you have a bad install of the TCP/IP stack.
 
G

Guest

Thank you Juan,
You are very helpful and explicit with your anwers as usual.

I spent about an hour researching the groups and Microsoft Technet with no
luck, so I posted here. Sometimes research doesn't pan out if you don't ask
the right questions...

Have a great day....
 

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

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top