"Page Cannot Be Found" Issue when Previewing via Expression Development Server

When you use the Preview in Browser feature in Expression Web for an ASP.NET or PHP page, Expression Web runs the Microsoft Expression Development server to preview your content in an environment that emulates a real-world web server.

 Microsoft Expression Development Server

Microsoft released a signature update to Windows Defender and Microsoft Forefront Security on March 9, 2009 that modifies your system’s hosts file to address a vulnerability. One of the side effects of this update is that an entry for localhost may have been removed from your system 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:       localhost

For example, here is what a system host’s file looks like (note, if you are not running Windows 7, the below lines may not be commented out):

system host's file in Notepad

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.

Comments (2)

  1. Alex says:

    I've spent 3 days trying to figure out why this was happening. THANKS!  =)

Skip to main content