Can’t view pages from the Web Development Server (Cassini)

Are you all of the sudden getting “Internet Explorer cannot display the webpage” / “Address Not Found” when trying to run a web application from inside Visual Studio?

This caused me a fair bit of headache yesterday, so now that I found the solution, I figured I’d try to spread the word.

Basically what’s happened is that an update for “Windows Defender and Microsoft Forefront Client Security” in the form of a new signature file was released on the 9th of March (Signature versions 1.53.283.0). This update was to address possible scenarios where a machines host file might get changed by a trojan or the like. Unfortunately however this had the side effect on some systems that the localhost entry in the host file was removed or corrupted, leading to any attempt to got to http://localhost/[whatever] will fail.

The solution as outlined in the links below in further detail, is to re-add the localhost entry (127.0.0.1       localhost) to your host file (C:\Windows\System32\drivers\etc\hosts).

I appreciate that these things are important etc. but for [insert appropriately bad word here] sake Microsoft, if you push out potentially breaking changes let us know!

In my case what happened was that, as a good Windows user I have automatic updates turned on and I let the machine restart when it needs to etc. Yesterday, after I’d not used Visual studio on my laptop for a couple days,  all of the sudden while sitting on a bus trying to do some Silverligth stuff, I couldn’t display any html pages when running then from VS. After some attempts at working out what the heck was going on and being on a bus with no internet connection I had to give up and pack up my laptop. Later after 30 min of Googling I found these two post helping me work out what had happened.
ASP.NET Web Development Server Stops Working
Visual studio Development Server problem in Vista

So I guess Microsoft had let us know in the way that the “Visual Web Developer team” let us know on their blog but come on, this should have been more publically announced in some way, according to some of the comments there are people out there who have struggled for days with this issue. I’m not really sure how they should have done it and maybe I’m just irritated because I got stung, lesson learnt from this. Turn off the automatic update and apply updates manually, once you know what they’re doing!

Happy coding :)
Ola

1 Comment

  • Someone on my team had something similar but there it was caused that localhost was removed from the hosts file. Adding it again and he could visit cassini pages again.

Comments have been disabled for this content.