Visual Studio 2005/2008 on Vista Internet Explorer cannot display the webpageAmr Saafan
I faced a strange problem with Visual Studio 2005 and Visual Studio 2008 which is I have several ASP.NET Projects some of them using .NET 2.0 or Visual Studio 2005 and the others are using .NET 3.5 or Visual Studio 2008.
The problem was when I try to run the Web Application I got this error:
Internet Explorer cannot display the webpage
I am not using IIS for these Web Application. I have tried the usual solutions such as Restart the Visual Studio, Restart my Laptop and Reinstall Visual Studio but nothing solve this problem. After searching for a solution for this problem I finally got the answer.
All you have to do is editing the host file located here %windir%\System32\drivers\etc\hosts
Open this file with Note Pad don’t forget to right Click and Run as administrator. Just comment the line that contains localhost as shown below:
No restart is needed, either of computer or Visual Studio.
# Copyright (c) 1993-2006 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
# For example:
# 22.214.171.124 rhino.acme.com # source server
# 126.96.36.199 x.acme.com # x client host
# 127.0.0.1 localhost
# ::1 localhost