【问题标题】:How do you debug ASP.NET startup issues using the Development Server如何使用开发服务器调试 ASP.NET 启动问题
【发布时间】:2009-08-03 22:44:17
【问题描述】:

我使用 MVC 项目模板创建了一个新的 ASP.NET MVC 项目。根据我正在阅读我正在阅读的 ASP.NET MVC 书(APRESS 的 Pro ASP.NET MVC 框架)的书,该应用程序应该使用 Visual Studio 开发服务器开箱即用。

它可以编译并运行,但 IE 返回页面加载错误...特别是以下错误:

This problem can be caused by a variety of issues, including: 

•Internet connectivity has been lost.
•The website is temporarily unavailable.
•The Domain Name Server (DNS) is not reachable.
•The Domain Name Server (DNS) does not have a listing for the website's domain.
•There might be a typing error in the address.
•If this is an HTTPS (secure) address, click Tools, click Internet Options, click Advanced, and check to be sure the SSL and TLS protocols are enabled under the security section.

我在 Windows 7 RC1 上运行 Visual Studio 8。我的机器上确实安装并运行了 IIS。

我更希望使用 VS 开发服务器让它工作,但我不知道为什么页面无法加载。

编辑
即使防火墙关闭......同样的问题。我使用 Windows 防火墙。
我正在以管理员身份运行 Visual STudio...仅供参考。

赛斯

【问题讨论】:

  • 该错误意味着IE无法连接到Web服务器。是否在任务栏中看到 Visual Studio Dev Server 图标?
  • 是的...图标在那里并且引用了一个端口。

标签: asp.net asp.net-mvc visual-studio visual-studio-2008


【解决方案1】:

问题是我的主机文件中有一个奇怪的条目。这是::1。不知道那是什么......但由于它是在 127.0.0.1 条目之后,所以它搞砸了。

我把那行注释掉了,一切都很好。

DETAILS...对于未来的类似问题。

我打开了 c:\windows\system32\drivers\etc。那里有一个名为 hosts 的文件(没有文件扩展名)。将它保存到您的桌面(Vista 和 Win 7 不允许您简单地编辑和保存此文件。)。根据需要对其进行编辑。复制并替换上述路径中的原件。

赛斯

【讨论】:

  • 我遇到了同样的问题,显然某些 Windows 更新会更改主机文件并弄乱 localhost 的条目。如果你想测试看看它是否将“127.0.0.1”的url的“localhost”部分替换为“127.0.0.1”,它可以工作,那么它的主机文件问题
  • ::1 是 IPv6 环回地址的 IP 地址。
【解决方案2】:

开发服务器在哪个端口上运行?如果它是恰好被另一个程序使用或阻止(防火墙)的端口,则可能导致冲突。您可以尝试更改开发服务器在项目属性中使用的端口,看看是否可以解决任何问题。您还应该禁用防火墙以确认它不会导致任何问题。

【讨论】:

  • 即使防火墙关闭...同样的问题。
猜你喜欢
  • 2011-06-24
  • 1970-01-01
  • 2010-09-30
  • 2010-10-15
  • 2020-05-16
  • 2011-02-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多