"Page Cannot Be Found" Issue when Previewing via Expression Blend

When you preview a Silverlight application in Expression Blend, we run the ASP.NET Web Development server in the background to preview your content in an environment that emulates a real-world web server:

aspDevServer

On March 9, a signature update to Windows Defender and Microsoft Forefront Security was released that modified your system’s hosts file to address a vulnerability. One of the side effects of this update was that an entry for localhost may have been removed from your hosts file.

This means that, when you preview your application using the ASP.NET Development Server, your browser will simply show a “Page cannot be displayed” (or equivalent) message.

To fix this problem, open C:\Windows\System32\drivers\etc\hosts in Notepad, and add the following entry:

127.0.0.1 localhost

For example, here is what my hosts file looks like (as Lucas pointed out in the comments, if you are not running Windows 7, the below lines may not be commented out):

hostsFile

A subsequent signature update to both Windows Defender and and Forefront Client Security, released on the same day as the earlier update, should not cause this problem.

The original source for this information comes from the Visual Web Developer Team’s blog post on this topic.

Cheers!
Kirupa :)

Comments

  • Anonymous
    March 15, 2009
    PingBack from http://blog.sharplab.net/computer/scripting/webscripting/1848/

  • Anonymous
    March 16, 2009
    The comment has been removed

  • Anonymous
    March 16, 2009
    Lucas - good catch. I didn't realize that Win7 does something different, but it seems like it does. I'll update the post to reflect this. :)

  • Anonymous
    July 21, 2009
    In VS2008, debugging my solution will start two development servers, one for the web server and another one for a WCF service in the solution, however, using Expression Blend 3 RC, I do not get the second expected development server. Does anyone have any recommendations? Is this a limitation of Blend?