1

When I yesterday returned to Visual Web Developer I was no longer able to run/debug my projects. Clicking the green play button launches ASP.NET Development Server (and it shows up in the systray) but the browser only shows the error message "Firefox is not able to connect to localhost:58127" (translated from Swedish). IE7 says "Cannot show web page".

I cannot figure out why this happens. It worked a couple of weeks back. Could there be a Windows setting that mess things up? (I've tried to disable the firewall without any change.)

scunliffe
  • 62,582
  • 25
  • 126
  • 161
matpe
  • 284
  • 4
  • 13

4 Answers4

2

Are you using Vista? I've had the same issues with recent Vista updates.

Firstly, make sure Visual Studio is running "As Administrator".

Secondly, when the browser launches, replace "http://localhost:" with "http://127.0.0.1:". If that works, then its because a Windows Update messed up your hosts file.

If this is the case, make sure you hosts file has this line in it, uncommented: "127.0.0.1 localhost"

my hosts file is in this directory: "C:\Windows\System32\drivers\etc"

yours will be something similar to that.

andy
  • 8,775
  • 13
  • 77
  • 122
  • That was it! When putting the ip in the browser's address field it suddenly worked. A quick update of the hosts file (which contained "::1 localhost") and a restart, everything is up an running again. Thanks for your help and happy easter! – matpe Apr 09 '09 at 18:06
  • haha, no problem man, happy easter to you too. Yeah, watch out for those updates, they've been messing up all my network stuff?? – andy Apr 10 '09 at 02:45
1

Are you perhaps using NOD32 or any other antivirus that may cause problems?

Magnus Johansson
  • 28,010
  • 19
  • 106
  • 164
  • No I don't, but it's the exact same symptoms. I came to thing of Fiddler that I installed a few days back. Could that be it? Somehow it works in between things. I uninstalled it now but still no difference. – matpe Apr 08 '09 at 20:20
  • Well, I have also seen issues with Fiddler when accessing certain web pages. But these issues was solved by just disabling the Capture Events menu item. – Magnus Johansson Apr 08 '09 at 22:01
0

I had this problem with Visual Studio 2013. I have set the Firewall system manually. This means that, at the time of communication by programs Firewall notify me. Incorrectly linked to "devenv.exe" was blocked by the Firewall. Correct mode of communication "devenv.exe" will solve the problem. in your case cheeck Firewall options and filtered communications.

0

I encountered this issue today and just wanted to elaborate because my hosts file had "127.0.0.1 localhost" already defined.

I was able to see the default IIS site by referencing localhost but when I tried debugging in my IDE it would always display "cannot display webpage" in IE and "Oops! Google Chrome cannot connect to localhost" in Chrome.

I opened a command prompt and typed "netstat -a" and reviewed the results. I saw that my port used by my debugging web server was listed as "LISTENING" on the local address of [::1] only:

TCP [::1]:64212 [ComputerName]:0 LISTENING

What's unusual to me is that debugging worked for a period of time and then it seemed like all of a sudden it stopped. The first couple times it happened I re-installed Visual Web Developer Express 2010. This became rather annoying because it was a long process and the problem continued to resurface after what seemed to be an arbitrary period of time.

This latest time I changed my hosts file to include "::1 localhost" (the opposite of this solution and numerous others I found online) and that has resolved my issues with my debugging environment.

I'm grateful this resolved my issue but am still curious as to why and how my debugging environment seems to change. Additionally, I'm curious why there are multiple loopback addresses other than 127.0.0.1. Is "::1" an ip6 standard? If so, shouldn't localhost be routing to 127.0.0.1 and interpreted by the tcp/ip stack as the same as ::1?

mzak
  • 1
  • Welcome to StackOverflow! The best (and required) way to ask your question and get great answers is to use the "Ask Question" button in the top right corner of your screen. – Mike G Oct 29 '12 at 18:38