Geeks With Blogs
Darren Fieldhouse

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 Posted on Tuesday, March 10, 2009 2:46 PM | Back to top


Comments on this post: WebDev.WebServer.exe not responding to requests

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
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.
Left by Dragan on Mar 10, 2009 4:14 PM

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
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!
Left by Bryan on Mar 11, 2009 8:24 PM

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
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
Left by Jack on Mar 12, 2009 12:01 PM

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
Thank you so much for this post. You saved me a couple of hours of useless searching!
Left by Lieven on Mar 19, 2009 9:10 PM

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
Hey

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

Bad patch. Bad!
Left by Rasmus Kromann-Larsen on May 12, 2009 7:08 PM

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
Great post. Would have delayed a project by several days.
Left by Keith Dennis on Jan 20, 2010 11:30 AM

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
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.
Left by Doug on Feb 09, 2010 12:48 PM

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
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
Left by Kay Pentecost on May 11, 2010 9:59 AM

# re: WebDev.WebServer.exe not responding to requests
Requesting Gravatar...
THANK YOU!
Left by Mark on Jul 18, 2010 9:35 AM

Your comment:
 (will show your gravatar)


Copyright © DarrenFieldhouse | Powered by: GeeksWithBlogs.net | Join free