ASP .Net Page Can't Be Displayed Error

穿精又带淫゛_ 提交于 2019-12-12 16:17:27

问题


I am having the strangest issue. My website has been working perfectly in Visual Studio 2008 until I tried to work on the website in Visual Studio 2012. Having abandoned that idea, I am now back to Visual Studio 2008 with the following problem.

Problem:

Any page inside any folder displays a "Page can't be displayed" error or similar in all browsers (IE, Firefox, Chrome, Safari) UNLESS the page is a Default.aspx page. Break points do not load for any of the pages having problems, although debugging is enabled in Web.config. There are no errors in the event viewer.

Possible reason for problem:

  • I tried working on the website in Visual Studio 2012. After it didn't recognize any of the imports, etc., I decided to just continue using Visual Studio 2008.
  • I also deleted all of the files and folders in my %temp% directory

What I've tried:

  • Create a new blank page in any folder to see if it will display; the page has the same error
  • Comment out all code on an existing non-Default.aspx page; same problem
  • Check the hosts file; nothing is active and other changes I've made had no effect
  • Browse to another page from Default.aspx; same problem "Page can't be displayed"
  • Checked for new AV, malware, etc. software recently installed; none installed
  • Created a new site on the same machine to see if new site will have the same problem. New site works just fine.
  • Cleared out the contents of C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files; no change

Environment:

  • Visual Studio 2008 on Windows 7 x64. The backend is in VB .Net
  • Running on the developer machine using ASP .Net Development Server

Any and all help is appreciated.

Thank you.


回答1:


So, I figured it out. Essentially, I was redirecting all but the Default.aspx pages to https (inside Global.asax). While this works on the production server that has valid certs, on the development machine, all one gets is the aforementioned behavior. Thank you all for the comments and suggestions.




回答2:


Had the same error.

Turning customErrors Off worked for me.

In web.config:

<customErrors mode="Off" defaultRedirect="ErrorPage.aspx" ...>



回答3:


In my case, Dropbox happened to be using the same port (49210). Fixed my issue by terminating the conflicting application. Alternately, change the port under the Project's properties.



来源:https://stackoverflow.com/questions/18839409/asp-net-page-cant-be-displayed-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!