热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

无法连接到Web服务器内置的Web开发人员-UnabletoconnecttoWebDevelopersbuiltinwebserver

WhenIyesterdayreturnedtoVisualWebDeveloperIwasnolongerabletorundebugmyprojects.Cli

When I yesterday returned to Visual Web Developer I was no longer able to run/debug my projects. Clicking the green play button launches ASP.NET Development Server (and it shows up in the systray) but the browser only shows the error message "Firefox is not able to connect to localhost:58127" (translated from Swedish). IE7 says "Cannot show web page".

当我昨天回到Visual Web Developer时,我无法再运行/调试我的项目。单击绿色播放按钮启动ASP.NET Development Server(它显示在系统托盘中),但浏览器仅显示错误消息“Firefox无法连接到localhost:58127”(翻译自瑞典语)。 IE7说“无法显示网页”。

I cannot figure out why this happens. It worked a couple of weeks back. Could there be a Windows setting that mess things up? (I've tried to disable the firewall without any change.)

我无法弄清楚为什么会这样。它工作了几个星期。可能有一个Windows设置弄乱了吗? (我试图在没有任何改变的情况下禁用防火墙。)

4 个解决方案

#1


Are you using Vista? I've had the same issues with recent Vista updates.

你在使用Vista吗?我最近的Vista更新遇到了同样的问题。

Firstly, make sure Visual Studio is running "As Administrator".

首先,确保Visual Studio正在“以管理员身份”运行。

Secondly, when the browser launches, replace "http://localhost:" with "http://127.0.0.1:". If that works, then its because a Windows Update messed up your hosts file.

其次,当浏览器启动时,将“http:// localhost:”替换为“http://127.0.0.1:”。如果可行,那么因为Windows Update搞砸了您的主机文件。

If this is the case, make sure you hosts file has this line in it, uncommented: "127.0.0.1 localhost"

如果是这种情况,请确保您的hosts文件中包含此行,取消注释:“127.0.0.1 localhost”

my hosts file is in this directory: "C:\Windows\System32\drivers\etc"

我的hosts文件位于以下目录中:“C:\ Windows \ System32 \ drivers \ etc”

yours will be something similar to that.

你的将是类似的东西。

#2


Are you perhaps using NOD32 or any other antivirus that may cause problems?

您是否正在使用NOD32或任何其他可能导致问题的防病毒软件?

#3


I encountered this issue today and just wanted to elaborate because my hosts file had "127.0.0.1 localhost" already defined.

我今天遇到了这个问题,只是想详细说明,因为我的hosts文件已经定义了“127.0.0.1 localhost”。

I was able to see the default IIS site by referencing localhost but when I tried debugging in my IDE it would always display "cannot display webpage" in IE and "Oops! Google Chrome cannot connect to localhost" in Chrome.

我通过引用localhost看到了默认的IIS站点,但是当我在IDE中尝试调试时,它总是会在IE中显示“无法显示网页”,并且Chrome中的“糟糕!谷歌浏览器无法连接到本地主机”。

I opened a command prompt and typed "netstat -a" and reviewed the results. I saw that my port used by my debugging web server was listed as "LISTENING" on the local address of [::1] only:

我打开一个命令提示符并输入“netstat -a”并查看结果。我看到我的调试Web服务器使用的端口仅在[:: 1]的本地地址上列为“LISTENING”:

TCP [::1]:64212 [ComputerName]:0 LISTENING

TCP [:: 1]:64212 [ComputerName]:0 LISTENING

What's unusual to me is that debugging worked for a period of time and then it seemed like all of a sudden it stopped. The first couple times it happened I re-installed Visual Web Developer Express 2010. This became rather annoying because it was a long process and the problem continued to resurface after what seemed to be an arbitrary period of time.

对我来说不同寻常的是,调试工作了一段时间,然后似乎突然停止了。它发生的前几次我重新安装了Visual Web Developer Express 2010.这变得相当烦人,因为这是一个漫长的过程,并且问题在看起来是一段任意的时间后继续重现。

This latest time I changed my hosts file to include "::1 localhost" (the opposite of this solution and numerous others I found online) and that has resolved my issues with my debugging environment.

这个最新的时间我改变了我的hosts文件,包括“:: 1 localhost”(这个解决方案和我在网上发现的其他许多其他对象),这解决了我的调试环境问题。

I'm grateful this resolved my issue but am still curious as to why and how my debugging environment seems to change. Additionally, I'm curious why there are multiple loopback addresses other than 127.0.0.1. Is "::1" an ip6 standard? If so, shouldn't localhost be routing to 127.0.0.1 and interpreted by the tcp/ip stack as the same as ::1?

我很感激这解决了我的问题,但我仍然很好奇我的调试环境为何以及如何改变。另外,我很好奇为什么除了127.0.0.1之外还有多个环回地址。 “:: 1”是ip6标准吗?如果是这样,localhost是否应该路由到127.0.0.1并由tcp / ip堆栈解释为与:: 1相同?

#4


I had this problem with Visual Studio 2013. I have set the Firewall system manually. This means that, at the time of communication by programs Firewall notify me. Incorrectly linked to "devenv.exe" was blocked by the Firewall. Correct mode of communication "devenv.exe" will solve the problem. in your case cheeck Firewall options and filtered communications.

我在Visual Studio 2013中遇到了这个问题。我手动设置了防火墙系统。这意味着,在通过程序通信时防火墙通知我。防火墙阻止了与“devenv.exe”的错误链接。正确的通信模式“devenv.exe”将解决问题。在你的情况下cheeck防火墙选项和过滤通信。


推荐阅读
  • 本文将介绍如何编写一些有趣的VBScript脚本,这些脚本可以在朋友之间进行无害的恶作剧。通过简单的代码示例,帮助您了解VBScript的基本语法和功能。 ... [详细]
  • 深入理解Cookie与Session会话管理
    本文详细介绍了如何通过HTTP响应和请求处理浏览器的Cookie信息,以及如何创建、设置和管理Cookie。同时探讨了会话跟踪技术中的Session机制,解释其原理及应用场景。 ... [详细]
  • 本文介绍了一款用于自动化部署 Linux 服务的 Bash 脚本。该脚本不仅涵盖了基本的文件复制和目录创建,还处理了系统服务的配置和启动,确保在多种 Linux 发行版上都能顺利运行。 ... [详细]
  • 如何在窗口右下角添加调整大小的手柄
    本文探讨了如何在传统MFC/Win32 API编程中实现类似C# WinForms中的SizeGrip功能,即在窗口的右下角显示一个用于调整窗口大小的手柄。我们将介绍具体的实现方法和相关API。 ... [详细]
  • 如何高效创建和使用字体图标
    在Web和移动开发中,为什么选择字体图标?主要原因是其卓越的性能,可以显著减少HTTP请求并优化页面加载速度。本文详细介绍了从设计到应用的字体图标制作流程,并提供了专业建议。 ... [详细]
  • 本文介绍了在Windows环境下使用pydoc工具的方法,并详细解释了如何通过命令行和浏览器查看Python内置函数的文档。此外,还提供了关于raw_input和open函数的具体用法和功能说明。 ... [详细]
  • 深入了解 Windows 窗体中的 SplitContainer 控件
    SplitContainer 控件是 Windows 窗体中的一种复合控件,由两个可调整大小的面板和一个可移动的拆分条组成。本文将详细介绍其功能、属性以及如何通过编程方式创建复杂的用户界面。 ... [详细]
  • 本文详细介绍了如何在 Windows 环境下使用 node-gyp 工具进行 Node.js 本地扩展的编译和配置,涵盖从环境搭建到代码实现的全过程。 ... [详细]
  • DNN Community 和 Professional 版本的主要差异
    本文详细解析了 DotNetNuke (DNN) 的两种主要版本:Community 和 Professional。通过对比两者的功能和附加组件,帮助用户选择最适合其需求的版本。 ... [详细]
  • 尽管某些细分市场如WAN优化表现不佳,但全球运营商路由器和交换机市场持续增长。根据最新研究,该市场预计在2023年达到202亿美元的规模。 ... [详细]
  • 将Web服务部署到Tomcat
    本文介绍了如何在JDeveloper 12c中创建一个Java项目,并将其打包为Web服务,然后部署到Tomcat服务器。内容涵盖从项目创建、编写Web服务代码、配置相关XML文件到最终的本地部署和验证。 ... [详细]
  • 本章将深入探讨移动 UI 设计的核心原则,帮助开发者构建简洁、高效且用户友好的界面。通过学习设计规则和用户体验优化技巧,您将能够创建出既美观又实用的移动应用。 ... [详细]
  • 深入解析 Apache Shiro 安全框架架构
    本文详细介绍了 Apache Shiro,一个强大且灵活的开源安全框架。Shiro 专注于简化身份验证、授权、会话管理和加密等复杂的安全操作,使开发者能够更轻松地保护应用程序。其核心目标是提供易于使用和理解的API,同时确保高度的安全性和灵活性。 ... [详细]
  • 微软Exchange服务器遭遇2022年版“千年虫”漏洞
    微软Exchange服务器在新年伊始遭遇了一个类似于‘千年虫’的日期处理漏洞,导致邮件传输受阻。该问题主要影响配置了FIP-FS恶意软件引擎的Exchange 2016和2019版本。 ... [详细]
  • 本文介绍如何在Linux Mint系统上搭建Rust开发环境,包括安装IntelliJ IDEA、Rust工具链及必要的插件。通过详细步骤,帮助开发者快速上手。 ... [详细]
author-avatar
墨镜小靖
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有