views:

2371

answers:

12

My development machine (Vista) was working perfectly fine for over a year and then suddenly (without explicitly installing anything) I am unable to run the websites using ASP.NET development server.

The development web server starts fine, but IE cannot display the page:

Internet Explorer cannot display the webpage Firefox says - Failed to Connect, The connection was refused when attempting to contact localhost:49447.

Here is what I have tried so far:

  • Disabling firewall
  • Stopping anti-virus
  • Stopping Windows Defender

It worked when I stopped all services using MSConfig and tried again. However, that disables most of the services, so is not a feasible long term solution.

After stopping all services, I tried starting services one by one to find out which one is causing problem.

These are the steps and results:

  1. I found DNS Client Service was causing problem.
  2. So I started all others and stopped DNS Client service, but then Network Location Awareness service started causing problem

  3. I stopped DNS Client Service and Network Location Awareness and started all others, btu again something else is causing problem.

Clearly there is something common and fundamental at the root of this.

I do not know much about networking. Can someone guide me in right direction?

Note: I have found another person who is having same problems since this morning. Looks like it could be related to one fo the windows updates! Is anyone else getting affected like me?

A: 

If stopping all the services made it owrk, try stopping one at a time. Eventually you will find out which one it is.

Hopefully someone will know which it is from experience, but if not you can find it yourself.

ck
A: 

Sounds like you have a proxy server issue - have you checked this out?

KB886388 - You may receive a "Failure to connect to Web server" error message when you browse local Web applications

Zhaph - Ben Duguid
I do not have any proxy server installed. This is my home machine. However, I did follow the steps given but it did not help.Note: I have found another person who is having same problems since this morning. Looks like it could be related to one fo the windows updates!
Puneet
A: 

I started experiencing this exact same issue this morning (Vista Pro) I also turned off Defender/Firewall which didn't help. And tried disabling DNS Client Service but that did not help either. It's happening in both VS2005 and VS2008

Sites running under my local IIS6, e.g. http://localhost/X/Default.aspx, run fine.

+11  A: 

I was able to fix this on my computer by doing the following:

My host file contained this line for the localhost entry, which is how the host file ships with Vista, and i've never modified this line ::1 localhost

Replaced "::1 localhost" with the this: 127.0.0.1 localhost

"::1 localhost" has worked fine for me for well over a year, until this morning. Windows defender installed two updates, one yesterday and one this morning, my guess is that something in one of these updates caused this entry to not work anymore.

thanks, I came close to tearing my hair out on this one. +1
AdamRalph
Thanks. I just experienced this problem as well.
Stuart Branham
As a note, you don't actually have to replace the ::1. You can add a separate entry to the file for 127.0.0.1 and it should work.
Stuart Branham
Perfect, it worked for me as well.
Puneet
My hero. If on Vista, remember that hosts can only be modified when running notepad as administrator
friism
Host file in Vista was located in:C:\Windows\System32\drivers\etcFile name is called host
Adam Berent
A: 

I also started to get this problem tonight, think I installed a windows update package yesterday.
I'm running VS 2008 (9.0.30729.1 SP) and Vista Ultimate SP1 (32-bit).

Replacing localhost with 127.0.0.1 worked for me.
http://localhost:49227/testsite/Default.aspx
http://127.0.0.1:49227/testsite/Default.aspx

salle55
A: 

Hi

I'm having the same problem. Was working on my website last night, one minute the site worked in the broswers next minute it could not connect to the localhost.

Replacing localhost to 127.0.0.1 worked for me. I'm still inexperienced in asp.net, is there a file where you change

http://localhost:49227/testsite/Default.aspx to

http://127.0.0.1:49227/testsite/Default.aspx

As I am just changing the url in the browsers

A: 

This one also worked for me. What I did was:

  1. Go to the Property Page of my Project.
  2. Then under Start Options, look for the Server, instead of 'Use default Web Server', i changed it to 'Use Custom Server'.
  3. Typed the http://127.0.0.1:49227/MyProject/ in the Base Url.

That's it. It automatically opens the site using this link.

+1  A: 

I have solved this problem.

The problem comes because somehow the entry in host file is removed for localhost.

you have to add entry in host file which is kept in System32/etc folder.

just add this at the end of the file.

127.0.0.1 localhost.

save this file and try to ping localhost from cmd prompt.

i think this will resolve your problem.

now try running you website.

All the best.............

A: 

Hi all,

Same problem here using visual studio 2008 express

Changed "localhost" to "127.0.0.1" and the page came up. This problem seems to have an effect on internet explorer and firefox

Opera hasn't seen this problem :-)

Grtz

A: 

Changing "localhost" to "127.0.0.1" worked well for me, as well.

but just to clarify the whom are not familiar with vista here are the guidelines to change:

  1. Browse to Start -> All Programs -> Accessories
  2. Right click "Notepad" and select "Run as administrator"
  3. Click "Continue" on the UAC prompt
  4. Click File -> Open
  5. Browse to "C:\Windows\System32\Drivers\etc"
  6. Change the file filter drop down box from "Text Documents (.txt)" to "All Files (.*)"
  7. Select "hosts" and click "Open"
  8. Make the needed changes and close Notepad. Save when prompted.
Thiago Diniz
A: 

worked with last blog thx

A: 

Sathyas answer Helped me

manasi