News


Rather than the productive day of web development I had planned I spent most of this morning trying to figure out why Visual Studio’s built in web server, webdev.webserver.exe, would not respond when I ran the web project.

At first I though it was the project so I checked the config, rebuilt it, and restarted Visual Studio – no luck.

Next I tried opening another project, that didn’t work either so I though it was something on my machine. Time to look at the anti-virus and firewall, but after disabling everything it still wasn’t working.

It was at this point I got a Skype message from one of my clients - “Do you know why the Development Web Server in Visual Studio might be broken?”. Ah ha! So it wasn’t just my machine. That must mean it was an update Microsoft pushed out.

Google didn’t have any likely looking results on the first couple of pages but a search of twitter returned a tweet from a developer in Prague (written in Czech) with the words Defender and webdev.webserver.exe in it. A quick pass through Google’s translation tool and I had the gist of the message: An update to Windows Defender has broken the mapping between localhost and the loopback address (127.0.0.1). All I had to do was run my project and replace localhost with 127.0.0.1 in the address bar and everything was fine.

I’ve wasted too much time on this as it is, so I’m going to stick with the workaround for now and I’ll update this post when I figure out the solution (unless you know the answer, in which case please post a comment!)

EDIT: Thanks to Dragan who dug a little deeper and found that it is the hosts file that is being modified. As he says in his comment, open C:\Windows\System32\drivers\etc\hosts and replace the ::1 next to localhost with 127.0.0.1

kick it on DotNetKicks.com

Comments

Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Dragan on 3/10/2009 4:14 PM
Thank you very very much, I was thinking of reinstalling VS 2005 because of this before I've bumped into your blog. :)

I found a workaround. You need to edit Winodws hosts file.

In Vista - Run Notepad As Administrator, point to C:\Windows\System32\drivers\etc then open file "hosts" and edit it. Enter 127.0.0.1 for localhost. It was ::1 for localhost when I opened it. Just save, and localhost will work again.
Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Bryan on 3/11/2009 8:24 PM
THANK YOU!

I've spent the past few hours fighting this same problem -- with Visual Studio 2008. I went through the same steps you did -- disable firewall, disable antivirus software, start to consider reinstall -- then I found your post. BINGO! Fixed.

You might want to point out that in Vista, you may need to alter the permissions on the hosts file before you can save the changes. Normally only an Administrator account can change that file.

Thanks again for the help!
Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Jack on 3/12/2009 12:01 PM
I was just about to wipe my PC when I decided to do one final google search on WebDev.WebServer.exe. THANK YOU! That would of been a major pain in the a***. Stupid Microsoft
Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Lieven on 3/19/2009 9:10 PM
Thank you so much for this post. You saved me a couple of hours of useless searching!
Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Rasmus Kromann-Larsen on 5/12/2009 7:08 PM
Hey

Thanks for sharing this information - just fixed my cassini to work again :-)

Bad patch. Bad!
Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Keith Dennis on 1/20/2010 11:30 AM
Great post. Would have delayed a project by several days.
Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Doug on 2/9/2010 12:48 PM
I have the same problem with the hang. HOWEVER, I looked at my hosts file and it is fine (no ::1). The one line in there is
127.0.0.1 localhost
so I am still at a loss. More searching, I guess.
Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Kay Pentecost on 5/11/2010 9:59 AM
I'm having problems with WebDev.WebServer, too, but my hosts file is correct... 127.0.0.1 . I'm running Win XP 64 bit SP2
Gravatar # re: WebDev.WebServer.exe not responding to requests
Posted by Mark on 7/18/2010 9:35 AM
THANK YOU!
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: