http://localhost not resolving on Vista Ultimate

  • Thread starter Thread starter John Kotuby
  • Start date Start date
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,,,
 
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.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
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....
 
Back
Top