when running asp.net project I get: Internet Explo

2019-07-07 09:10发布

问题:

I recently installed vs2005 with sp3.5 on a new vista computer. Never had Visual Studio installed on this computer.

whenever i'm building a web project, i receive the following: "Internet Explorer cannot display the webpage".

I can't run any of my projects...

Thanks

回答1:

This is because the system blocks the name localhost with a port number. If you replace the word localhost and type 127.0.0.1 it should work.

To fix this issue, open the hosts file "C:\Windows\System32\drivers\etc\hosts" and comment the line "::1 localhost" and then retry.

Please note that this line is required by IP v6 and should not be removed if you are using it.



回答2:

If you use the nod32 antivirus, follow the instructions below:

  1. DoubleClick on Nod32 icon on tray and open it up.
  2. 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".)
  3. Then go to the SETUP section. Then on the right pane click on "Antivirus and Antispyware protection". The panel should be opened.
  4. Now in the "Web Access protection" click on "Configure..."
  5. From the left Tree go to path: "Web access protection > HTTP > Web Browsers".
  6. Now you should see Visual Studio 8 "devenv.exe" in the list.
  7. Click on it twice till you see a cross sign in the box. (Note on CROSS sign, not mark sign.)
  8. With this cross sign you tell the Nod32 that this program should not be scanned and filtered for web access.


回答3:

The most likely reason is that you don't have a webserver configured to serve your website. By default, a new web site project should be configured to start the ASP.NET Development WebServer. You should look at the project properties to ensure that is indeed the case.

It is also possible that the webserver is configured and running properly. However, (if I remember correctly) the website projects are configured to launch IE with the address of the current page you have open in the editor. If you are developing an ASP.NET MVC website, that will result in the issue above, as the MVC routing system is configured to reject explicit requests to the pages and process only requests through the proper routes to the controllers. Check your address bar and amke sure you are navigating to the root of your website to make sure it works fine.

If that is also not the problem, you should enable debugging for you website project to get additional information about the actual problem.

Two side notes:

  1. I would suggest upgrading the Visual Studio 2008. It's support for website porjects is way better.
  2. If you are doing websites, an HTTP-intercepting tool like Fiddler or HttpWatch will be very useful to debug the interaction between the browser and your website.


回答4:

using 127.0.0.1 localhost as the last statement in C:\Windows\System32\drivers\etc\hosts with ::1 localhost as previos statement worked



回答5:

Try enabling debugging to get a more specific error.



回答6:

You might want to check the following;

  • Website has been created in IIS
  • Website is running correct version of .Net
  • There are only websites of the same .Net version in each application pool
  • The site can run scripts

I prefer to change VS to use the local IIS rather than the built in web server which usually runs on a different port and you have less control over it.



回答7:

An infinite loop may cause that error, however it's unlikely that is happening on all your projects.



回答8:

You should post the exact error message, and how you got IE to launch. Was it after you went to Debug->Start Debugging or Start Without Debugging? Or are you typing the URL into an instance of IE you launched yourself? If so, are you sure you have the right URL?

Does the build output show it was complete and successful? VS won't launch the built-in web server if it can't compile the solution.



回答9:

I got a similar problem.. Here's the solution: http://kalpeshpadia.wordpress.com/2009/03/17/aspnet-development-internet-explorer-cant-display-page/



回答10:

  1. I think you should check your antivirus and firewall.There is a chance of it blocking your requests.

  2. Please install IIS in your machine or upgrade to IE 8.



回答11:

Go to start/control panel/administrative tools, can you see internet information services ? if not, you need to install IIS.

if you can see IIS, then in Internet Explorer, tools/internet options/advanced uncheck Show friendly http messages. then try again and post your new error message here.