views:

2280

answers:

9

I used to run web applications all the time on my laptop, no problems, I am using VWD 2008 Express, i have the latest framework, Windows Vista Home Basic...etc.. Now, when ever i try to run a website, or even chose to Show a Page in Browser from Within VWD, the browser (both IE and Firefox) keeps looking for www.localhost.com...

I tried to copy the address of and paste it directly in the title bar, nothing, same problem i tried to get that address from the balloon notification (the one that pops up when you run any ASP.net project), still nothing happens...

My colleague is facing the same problem, but for him, he can simply copy and paste the url in the address bar, but its not working with me....Heeeeeellllllllllllllllp

+8  A: 

Check your hosts file, it should be redirecting localhost to 127.0.0.1 and nothing else. The entry that will cause this error should look like this:

127.0.0.1    www.localhost.com

If you find this, remove it or change www.localhost.com to localhost.

You can also try to post one of these in the adress bar:

127.0.0.1
http://localhost

Note that the hosts file is a popular victim of viruses, so if is has been modified, you might run a check on viruses.

Also see the discussion here.

schnaader
+1  A: 

A couple of random things to check...

  • localhost is the conventional name for the IP address 127.0.0.1. If that address doesn't work, then you have a network configuration problem.

  • There will be a hosts file somewhere, probably in somewhere like C:\Windows\System32\Drivers\Etc\hosts which should usually contain only that definition for localhost. If it has more names in it and you didn't put them there, then you have another problem entirely.

RBerteig
+3  A: 

If that also doesn't work, open up nod32 (you probably have it installed on your system if the above methods don't work) go to advanced setup, on the left menu, select protocol filtering, and select HTTP and POP3 ports... ;)

Emin
ZOMG, I was trying to solve this for ages....
majkinetor
A: 

Thanks for the nod32 solution :)

alex
+1  A: 

There is also the forehead-slapping possibility that your web server is not currently running. :)

Nathan Long
I just did that, I guess apache beats out iis in terms of startup
Woot4Moo
+1  A: 

Thanks for the nod32 solution :)

Alex
A: 

Nod32 solution worked XD

DTK
A: 

I got the same problem in firefox 3.6 when my server was down. In my case it was not a problem with etc/hosts where the line

127.0.0.1 localhost

was there and OK.

The solution that worked for me was to disable the "cleaver" URL fixing that Firefox carry out when the page is not found. The procedure taken from here:

  1. Type about:config in the address bar and hit return.
  2. find browser.fixup.alternate.enabled
  3. double click the “true” value. The line will become bold, and the value will change to “false”

This fix directly the problem. No firefox restart needed. If your server is down you get "page not found" as expected. Hope it helps.

joaquin