简体   繁体   English

在Visual Studio中创建ASP.NET网站时出错

[英]Error when creating ASP.NET website in Visual Studio

I'm trying to learn ASP.NET. 我正在尝试学习ASP.NET。 I open Visual Studio (this happens in both 2008 and 2010) and creating a new ASP.NET website using .NET 3.5. 我打开Visual Studio(在2008年和2010年都会发生这种情况),然后使用.NET 3.5创建一个新的ASP.NET网站。 When I attempt to run the website, a FireFox page opens up and tells me that it can't establish a connection to the server (localhost:####). 当我尝试运行网站时,FireFox页面打开,并告诉我它无法建立与服务器的连接(localhost:####)。 There's no helpful error message, just "cannot connect." 没有有用的错误消息,只是“无法连接”。 What could be causing this? 是什么原因造成的?

If you select your website in Visual Studio, you can set 'Use dynamic port' to false. 如果在Visual Studio中选择网站,则可以将“使用动态端口”设置为false。 Than you can configure to use a port which your firewall doesn't prohibit access to. 比您可以配置为使用防火墙不禁止访问的端口。 (often 8080 is chosen, as 80 is already in use). (通常选择8080,因为80已经在使用中)。

To be sure you port is open, configure your firewall to let your application have access to that port. 为确保端口是开放的,请配置防火墙以使您的应用程序可以访问该端口。 Completely shutting down your firewall is not what we are recommending I believe. 我认为,完全关闭防火墙不是我们所建议的。

By the way, if you are new to Visual studio and asp.net and creating websites, I recommend, depending on what you way want to do look into the difference of asp.net website and asp.net web application. 顺便说一句,如果您不熟悉Visual Studio和asp.net并创建网站,我建议您根据自己想做的方式来研究asp.net网站和asp.net Web应用程序的区别。 (asp.net web application is only available in the payed versions though I believe...) (尽管我相信,asp.net Web应用程序仅在付费版本中可用...)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Visual Studio 2012部署ASP.NET网站(.NET 2) - Deploy ASP.NET Website (.NET 2) using Visual Studio 2012 Visual Studio | ASP.NET配置错误 - Visual Studio | ASP.NET Configuration error Visual Studio Asp.net网站编译错误:不允许子节点 - Visual Studio Asp.net Website Compilation error: Child nodes not allowed 运行Asp.Net网站项目时如何在Visual Studio 2010中禁用脚本调试? - How to disable script debugging in Visual Studio 2010 when running Asp.Net website project? 在构建ASP.NET网站时,如何查看Visual Studio生成的元项目文件? - How do I view the metaproj files generated by Visual Studio when building an ASP.NET website? 网站发布后,Visual Studio 2015 ASP.NET按钮不再起作用 - Visual Studio 2015 ASP.NET Button no longer works when website is published 在Visual Studio外部重新安装ASP.NET网站的NuGet包 - Reinstall NuGet packages for ASP.NET Website outside Visual Studio 带有Visual Studio 2015的ASP.NET WebSite SSL - ASP.NET WebSite SSL with Visual Studio 2015 在Mac上的Visual Studio上导入现有的asp.net网站 - Import existing asp.net website on Visual Studio for mac 无法使用Visual Studio 2008创建ASP.NET网站 - Not able to create an ASP.NET website with visual studio 2008
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM