Answered by:
"Internet Explorer cannot display the webpage" from IE7 - ASP.NET Development Server Error?

Question
-
User1844883754 posted
Dear everybody,
I've just installed Microsoft Visual Studio 2008 on Windows Vista Ultimate. I created "New Web Site" and Started Debugging the page to see the blank page rendered. To my surprise, IE 7.0 displayed an error message saying: "Internet Explorer cannot display the webpage". I spent some time investigating and here is the result:
-
The page going to be rendered assumes port 49791: http://localhost:49791/WebSite3/Default.aspx
-
The ASP.NET Development Server operates under different port no: 49793
-
After changing the url above manually to use the port of ASP.NET Development Server, the webpage gets renderred correctly: http://localhost:49793/WebSite3/Default.aspx
-
ASP.NET Development Server uses dynamic ports. I noticed that Debugging process always assumes port number lower by 2 than the real port number of the ASP.NET DevSer. Therefore Debug process never runs and displays the page.
I do not want to manually edit the local host URL after every page rebuild, so my question is following:
-
How to make the "Start Debugging" function to use appropriate port of the ASP.NET Development server? How to make Visual Studio to open the page being debugged?
To mention couple of things I tried: I reinstalled Visual Studio2008, tried to disabled IPv6 as some threads recommend - nothing helps.
Any idea would be welcome, because I have no idea what else to try. Thank you in advance.
Tuesday, March 18, 2008 5:50 PM -
Answers
-
User1844883754 posted
For everybody having this problem, I have found a solution:
-
This problem occurs, when NOD 32 Antivirus by ESET is installed, version 3.0.621.0
-
The Antivirus Software contains Web Access Protection that automatically disables the dynamic port of ASP.NET Development Server.
The Solution:
-
In the Advanced setup of ESET NOD Antivirus you need to locate the section shown in the image below and uncheck the web development server.
-
Make sure you stop the web development server if it's still running and then try debugging from Visual Studio again.
---------
Or, follow these steps that basically describe the same solution in step-by-step way:
-
DoubleClick on Nod32 icon on tray and Open it up.
-
if it is not in "Advanced Mode" , switch to Advanced Mode. ( you can do it by clicking on the bottom-left link "Display:Standard Mode" and then click on "Toggle Advanced Mode" )
-
then goto SETUP section. then on the Right Pane click on "Antivirus and Antispyware protection". the panel should be opened.
-
now in the "Web Access protection" click on "Configure..."
-
from the left Tree go to path : "Web access protection > HTTP > Web Browsers"
-
now you should see visual studio 8 "devenv.exe" in the list .
-
click on it twice till you see a cross sign in the box. ( Note on CROSS sign , not mark sign ! )
-
with this cross sign you tell the Nod32 that this program should not be scanned and filtered for web access.
I hope that this helps. I want to thank to NesNYC718 for his attention and attempts to help me.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, March 19, 2008 5:28 PM -
All replies
-
User1844883754 posted
Does anybody have commnents or ideas what could help? I will gladly try anying expect formatting my hard drive. :-)
Wednesday, March 19, 2008 4:52 AM -
User1051846653 posted
What antivirus are you using? does it mess with your ports? How about firewalls? do you have them set too hight?
I'm on Vista Ultimate also, I have no problem with VS2008. I have CA Antivirus and using the windows firewall. You might want to try and disable your security temporarily and see if it works. You should not have to edit URL's to get it to work. It should work once you hit the debug button and run the web app.
Wednesday, March 19, 2008 5:00 AM -
User1844883754 posted
Hello NesNYC718. Thank you a lot for replying.
I use NOD Antivirus. I tried to disable theantivirus, disabled firewall, but still after pressing the F5 key for Debugging, the IE7/Internal Web Browser/FireFox opened but they still refered to different port number - and the page did not run.(I had to manually change the port number)
Yes, you are correct, maybe, I should try to uninstall the antivirus and maybe to use something different.
NesNYC718, I noticed that if I create a new C# Proejct (ASP.NET WebSite), I can get page open appropriatelly. This happens only, when I create New WebSite - hopefully to understand the difference. There must be a solution to this.
-
Should the port in the URL of the debugged page be the same as the port of ASP.NET Development Server, please?
Wednesday, March 19, 2008 5:07 AM -
-
User1051846653 posted
I use NOD Antivirus.Is that Norton? If so, I'd cosider an alternative. Something is not letting you apps talk to eachother and the security software is most likely to blame. See if you can set your security software to make exception for the processes in question. I recall a while back that some Norton products have a "saftey" feature that disallows apps from talking to themselves. You can probably find such settings in the advanced features but I'd get rid of it all together. Uinstall it and see if that does the trick.
Wednesday, March 19, 2008 2:38 PM -
User1051846653 posted
Could any body confirm please, if the port of the ASP.NET Development Server should be the same as the port of the debugged page (ex: http://localhost:49791/WebSite3/Default.aspx), during debug process?Where are you "publishing" this page to? Did you create a new website on you local file system or a remote website? The development server's operation is seamless and you should not have to worry about what port it's using. Everything is automatic as IE is launched with that local address but debugging should be enabled in IE as well, did you check your "Internet Options" and see if you have debugging enabled in IE?
Wednesday, March 19, 2008 2:42 PM -
User1844883754 posted
Hello NesNYC718,
Thank you for paying attention to my problem. Right now I am experimenting and trying to find an answer to my problem.
However, to answer your questions:
-
NOD Antivirus that I use is product by ESET (http://www.eset.com/). During one of my experiments I disabled Windows Firewall, which I use the same as you, the NOD Antivirus, and the Widnows Defender. I disabled them all in once, and even stopped them as services. The problem persists: the ASP.NET development server uses a dynamically created port (ex: 53013), however the webpage that gets opened always refers to a port lower by two(ex: http://localhost:53011/WebSite3/Default.aspx)
-
I am publishing this page in my local system - therefore I rely on ASP.NET Development Server, so I do not have to install IIS.
I noticed, that the IE7 refers to Internet with the wrong port, which is lovered by two. However, when I correct the URL by typing correct port number, the IE7 starts referring to Intranet. If I preset detault web browser to FireFox for example, the same things happens - the wrong URL is present. When I create "New Project" - the problem diminishes, and everything works fine. When i create "New WebSite" the problem always persists.
-
I will keep reading and will inform you if there is anything new. If anybody has a new idea I woud be happy to know about it.
Thank you,
Rene
Wednesday, March 19, 2008 4:17 PM -
-
User1844883754 posted
For everybody having this problem, I have found a solution:
-
This problem occurs, when NOD 32 Antivirus by ESET is installed, version 3.0.621.0
-
The Antivirus Software contains Web Access Protection that automatically disables the dynamic port of ASP.NET Development Server.
The Solution:
-
In the Advanced setup of ESET NOD Antivirus you need to locate the section shown in the image below and uncheck the web development server.
-
Make sure you stop the web development server if it's still running and then try debugging from Visual Studio again.
---------
Or, follow these steps that basically describe the same solution in step-by-step way:
-
DoubleClick on Nod32 icon on tray and Open it up.
-
if it is not in "Advanced Mode" , switch to Advanced Mode. ( you can do it by clicking on the bottom-left link "Display:Standard Mode" and then click on "Toggle Advanced Mode" )
-
then goto SETUP section. then on the Right Pane click on "Antivirus and Antispyware protection". the panel should be opened.
-
now in the "Web Access protection" click on "Configure..."
-
from the left Tree go to path : "Web access protection > HTTP > Web Browsers"
-
now you should see visual studio 8 "devenv.exe" in the list .
-
click on it twice till you see a cross sign in the box. ( Note on CROSS sign , not mark sign ! )
-
with this cross sign you tell the Nod32 that this program should not be scanned and filtered for web access.
I hope that this helps. I want to thank to NesNYC718 for his attention and attempts to help me.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Wednesday, March 19, 2008 5:28 PM -
-
User1051846653 posted
The Antivirus Software contains Web Access Protection that automatically disables the dynamic port of ASP.NET Development Server.Yep, just what I thought. "Security" software is designed for folks that haven't a clue about really protecting their machine and there for use "overkill" features to insure "safety," LOL! Even then, I've seen people get attacked anway.
I hope that this helps. I want to thank to NesNYC718 for his attention and attempts to help me.You're welcomed.
Wednesday, March 19, 2008 5:36 PM -
User1137082196 posted
I Had the same problem running on Vista.
My solution was removing the next line in the windows host file C:\Windows\System32\drivers\etc\hosts
::1 localhost
This is an IpV6 entry. Put a # in front of it.
Friday, March 21, 2008 8:14 AM -
User-1254486034 posted
Hi,
After I tried to uncheck it on the web browser filter list (I'm also using ESET smart security), I still has the same error. I use Visual Studio 2005 on Vista. Before I tried this approach, I had installed IIS 7.0 and 6.0. and, nothing helped. So, any idea?
This condition is exactly what I'm having right now, but somehow I can't solve it the way you did. Is it because I just installed .net 3.5 ? I doubt it that is the problem.
-Evo
Tuesday, August 12, 2008 2:43 PM -
User1159456627 posted
Thank you Arien.
I am using "Eset smart security 3.0.669.0" in both my laptop and desktop computers. They both have the same problem. The laptop had the problem even after formatting and only installing vista ultimate, visual studio 2008, MS office and ESET SS.
Bunkai's solution didn't work for me. But after adding '#' before "::1 localhost" "in hosts" file, it worked. Is ESET SS putting that string in the host file?
I spend nearly 2 days to solve this problem and formatting my laptop didn't worked.
Whatever, thank you all for this post! Have a nice day..
Tuesday, August 12, 2008 2:57 PM -
User-1254486034 posted
Can someone explain what does 'adding "#" before "::1 localhost" in /.../.../host' do (other than to comment that line, why do we need to make this line to be commented)? is there any (bad) effect for this change?
Btw, it helps me, thank you.
Tuesday, August 12, 2008 3:11 PM -
User-789675089 posted
I also solved the problem with deleting "::1 localhost".
off topic:
I wanna thank Microsoft for putting that line there.
I also wana than Microsoft for building Vista® in such way that I needed to log in as Administrator to change this "hosts" file, or anything else in windows folder even if my account belongs to the Administrators group,
Thank you for putting beautiful default font in Vista® which need hawks vision to distinguish comma from dot.
Thank you for occupying 23.5GB of my hard drive with "Windows" folder (Vista® x64 all updates applied).
Thank you for making this forum without visible possibility of replaying on topic itself rather than replaying on other users posts.
Thank you for all.
I love you guys, you are making my life, with one full time and two part time jobs, so much better.
Thursday, September 11, 2008 9:42 PM -
User1722905579 posted
Could someone plaese explain how to remove this line??
Ik really don't know how to do this [:$]
Wednesday, November 12, 2008 6:26 AM -
User1747552701 posted
Could someone plaese explain how to remove this line??
Ik really don't know how to do this
You need proper permissions. Locate your Notepad.exe and right click it and chose "Run as Administrator." Supply password if needed. Then, in Notepad, chose File --> Open and then browse your way to c:\windows\system32\drivers\etc and open the "hosts" file. Make sure you select "All Files (*.*)" Add # to the line in question and save the file. Perhaps you have to reboot your system.
This worked for me on Win Vista Business 32bit.
Thursday, November 13, 2008 3:27 PM -
User581921910 posted
Hi, Also please note that Vista has IPV6 which have some problems with the Web server that VS2008 uses. try opening your page after you disable Ipv6 for Vista. Thanks, ThaniTuesday, March 10, 2009 10:30 PM -
User-1575438868 posted
I had the same problem. And I looked at the hosts file.
The problem is not the ::1 for IPV6, but the missing 127.0.0.1 localhost entry.
Correct hosts must look like this in Vista:
# 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:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
::1 localhostOne of the updates yesterday must have deleted the first line at my system.
Thank you very much.
I had this same problem, and it has to be a security update from Microsoft that removed this, because it worked before the weekend, and now suddenly it didn't .
Adding the line
127.0.0.1 localhost
in the hosts file located in "C:\Windows\System32\drivers\etc\"
did the trick for me, and I don't have the NOD antivirus that seems to be the case for most replies in this thread.
Wednesday, March 11, 2009 9:06 AM -
User291654208 posted
Hi, I too have had this problem today, yesterday all was fine! I don't have NOD AV installed and IPv6 has always been enabled without issues!. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p><o:p> </o:p>According to this post - http://msmvps.com/blogs/donna/archive/2009/03/10/windows-defender-false-alarm-triggered-by-hosts-file.aspx - the issue is with a windows defender update which was deployed via automatic update on Monday.<o:p></o:p>Wednesday, March 11, 2009 2:27 PM -
User-1601635539 posted
*Quote*
I Had the same problem running on Vista.
My solution was removing the next line in the windows host file C:\Windows\System32\drivers\etc\hosts
::1 localhost
This is an IpV6 entry. Put a # in front of it.
*Quote*
In the hosts file C:\Windows\System32\drivers\etc\hosts
Get rid of the ::1 and replace it with 127.0.0.1
The line in the HOSTS file should look like this...
127.0.0.1 localhost
Worked for me... Good luck
Monday, June 1, 2009 6:26 PM -
User-252759172 posted
HELLO, I have similar probem -
Web Developer is working perfect until I want to view my web site in a browser - Internet Explorer cannot display the webpage. I clicked to "diagnose connection problem and it says "localhost" is not set up to establish the connection on port 52139 with this computer.
I have a Symantec AntiVirus - this is comercial Norton product. I tried to disable it and Firewall - but it did not help. Same problem I have in Mozilla Firefox..
And in my antivirus I do not have advane options - the control windows is very limited.
If anybody had same program and can help with solution.. please.. let me know..
I am a college student - just started to learn this software..
Friday, September 18, 2009 5:35 PM -
User-1303760475 posted
Close any sites/projects in VWD and then close VWD. Locate the 'hosts' file at C:\Windows\System32\drivers\etc\hosts
Open the Hosts file in Note Pad and check to see if the line below is there:
127.0.0.1 localhost
If it is not, add it. Save, and close the file. Next, start VWD, open a site and press Ctrl+F5. The dev server should start, and your default page should be displayed in your browser.
This solution has worked for many people. Please let us know if it works for you, or no.
Cheers,
-Preston
Friday, September 18, 2009 11:38 PM -
User902314318 posted
I'm still having the stated problem.
I goto view in browser in Visual Studio and the page errors "cannot be displayed", however; I can type in the directory and view all the files in the folder through the browser on http://LocalHost:Port/... but any file I click on regardless of extension throws the cannot be displayed.
First thing I did was check the security software... Only Windows Firewall installed and it's disabled. (tried adding exceptions anyways just in case) No Antivirus is installed as this computer strictly makes websites, no E-mail, it's isolated from the rest of the network, and I don't go to many sites beyond ones like ASP.NET, the sites I maintain, etc.
Second, after reading this I checked my HOSTS file, 127.0.0.1 Localhost was there as it should be. and I'm not using IPv6, Running XP Professional SP3 (32bit), I've tried going to the page using 127.0.0.1 to see if it was a DNS issue, same results as localhost which takes DNS out, I'm not on a proxy, so that's out, No firewall running... scratch that, and hosts is okay, and well I'm more or less out of ideas.
The ports are matching server and browser wise, and I even tried installing IIS to see if it'd pick it up. No luck there, I'm sure I could get IIS to host, but I'm only looking at using this to test and debug so I'd prefer save the headaches from running a local IIS service for a site I host else where...
Any ideas? cause I'm about out of them.
Monday, October 26, 2009 3:41 PM -
User-746230857 posted
Hello: Everyone,still cant not.
Cannot create the --<C:\Windows\System32\drivers\etc\hosts file. Make sure that the path and file name are correct.>
Cant solve this error, cant save it... after cilck save, same error come back ---
<Cannot create the C:\Windows\System32\drivers\etc\hosts file. Make sure that the path and file name are correct. >
thanks
Sunday, January 3, 2010 10:47 AM -
User1877032172 posted
i have a same problem but it is solved now .......... i just want to thank you guys :)
Thursday, January 7, 2010 5:42 PM -
User1576085864 posted
Hats of to you Arien
you are a life saver.... it took 7 days of mine to understand what the problem was....
Thanks a billion
Saturday, January 9, 2010 4:55 PM -
User-2069887517 posted
Hello guys,
I'm exactly in the same case as MetalIce.
As web developper, I have many VS2005 projects.
Sometimes the debugger works fine, sometimes I get this #!?"&#! error, it doesn't depend on the project.
Did someone find THE solution?
Thanks
I'm still having the stated problem.
I goto view in browser in Visual Studio and the page errors "cannot be displayed", however; I can type in the directory and view all the files in the folder through the browser on http://LocalHost:Port/... but any file I click on regardless of extension throws the cannot be displayed.
First thing I did was check the security software... Only Windows Firewall installed and it's disabled. (tried adding exceptions anyways just in case) No Antivirus is installed as this computer strictly makes websites, no E-mail, it's isolated from the rest of the network, and I don't go to many sites beyond ones like ASP.NET, the sites I maintain, etc.
Second, after reading this I checked my HOSTS file, 127.0.0.1 Localhost was there as it should be. and I'm not using IPv6, Running XP Professional SP3 (32bit), I've tried going to the page using 127.0.0.1 to see if it was a DNS issue, same results as localhost which takes DNS out, I'm not on a proxy, so that's out, No firewall running... scratch that, and hosts is okay, and well I'm more or less out of ideas.
The ports are matching server and browser wise, and I even tried installing IIS to see if it'd pick it up. No luck there, I'm sure I could get IIS to host, but I'm only looking at using this to test and debug so I'd prefer save the headaches from running a local IIS service for a site I host else where...
Any ideas? cause I'm about out of them.
Friday, February 26, 2010 5:16 AM -
User-2069887517 posted
Hi again,
After more investigations, I found the solution that seems to solve my issue:
- Open RegEdit
- Browse to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
- Add a dword under this key called TabProcGrowth
- Set TabProcGrowth to 0
For more details, here is the original explanation:
Friday, February 26, 2010 5:30 AM -
User-1552391517 posted
I think you must get an virus or spyware if your Internet Explorer cannot open the site.
Try to run AVG clean the virus.
Tuesday, March 16, 2010 2:57 AM -
User-997818305 posted
http://ie8troubleshoot.blogspot.com/2010/06/internet-explorer-cannot-display.html
Saturday, June 26, 2010 8:15 AM -
User336673788 posted
Bunkai,
=) we have the same antivirus software. thanks to you i'm able to get my debug working without altering the wrong port to the correct port everytime hitting F5 in VS.
cheer
Thursday, December 9, 2010 3:11 PM -
User933695886 posted
I have ESET NOD 4, had the same problem and was solved by unchecking visual studio and asp.net webserver from the browser screen.
Thanks
Wednesday, January 19, 2011 8:13 AM