热门标签 | 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防火墙选项和过滤通信。


推荐阅读
  • 搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的详细步骤
    本文详细介绍了搭建Windows Server 2012 R2 IIS8.5+PHP(FastCGI)+MySQL环境的步骤,包括环境说明、相关软件下载的地址以及所需的插件下载地址。 ... [详细]
  • svnWebUI:一款现代化的svn服务端管理软件
    svnWebUI是一款图形化管理服务端Subversion的配置工具,适用于非程序员使用。它解决了svn用户和权限配置繁琐且不便的问题,提供了现代化的web界面,让svn服务端管理变得轻松。演示地址:http://svn.nginxwebui.cn:6060。 ... [详细]
  • C#多线程解决界面卡死问题的完美解决方案
    当界面需要在程序运行中不断更新数据时,使用多线程可以解决界面卡死的问题。一个主线程创建界面,使用一个子线程执行程序并更新主界面,可以避免卡死现象。本文分享了一个例子,供大家参考。 ... [详细]
  • 如何解决《在Go模板中包含js文件》经验,为你挑选了1个好方法。 ... [详细]
  • Nginx使用(server参数配置)
    本文介绍了Nginx的使用,重点讲解了server参数配置,包括端口号、主机名、根目录等内容。同时,还介绍了Nginx的反向代理功能。 ... [详细]
  • springboot项目引入jquery浏览器报404错误的解决办法
    本文介绍了在springboot项目中引入jquery时,可能会出现浏览器报404错误的问题,并提供了解决办法。问题可能是由于将jquery.js文件复制粘贴到错误的目录导致的,解决办法是将文件复制粘贴到正确的目录下。如果问题仍然存在,可能是其他原因导致的。 ... [详细]
  • 延迟注入工具(python)的SQL脚本
    本文介绍了一个延迟注入工具(python)的SQL脚本,包括使用urllib2、time、socket、threading、requests等模块实现延迟注入的方法。该工具可以通过构造特定的URL来进行注入测试,并通过延迟时间来判断注入是否成功。 ... [详细]
  • IOS开发之短信发送与拨打电话的方法详解
    本文详细介绍了在IOS开发中实现短信发送和拨打电话的两种方式,一种是使用系统底层发送,虽然无法自定义短信内容和返回原应用,但是简单方便;另一种是使用第三方框架发送,需要导入MessageUI头文件,并遵守MFMessageComposeViewControllerDelegate协议,可以实现自定义短信内容和返回原应用的功能。 ... [详细]
  • Gitlab接入公司内部单点登录的安装和配置教程
    本文介绍了如何将公司内部的Gitlab系统接入单点登录服务,并提供了安装和配置的详细教程。通过使用oauth2协议,将原有的各子系统的独立登录统一迁移至单点登录。文章包括Gitlab的安装环境、版本号、编辑配置文件的步骤,并解决了在迁移过程中可能遇到的问题。 ... [详细]
  • ①页面初始化----------收到客户端的请求,产生相应页面的Page对象,通过Page_Init事件进行page对象及其控件的初始化.②加载视图状态-------ViewSta ... [详细]
  • [分享]用于Asp.Net的敏感内容评审控件
    引言之前在这篇文章中分享了敏感内容评审类及其辅助工具:http:www.cnblogs.comSkyDarchive200908211551112.html此次分享的工具是在 ... [详细]
  • 如何解决《如何在我自己的服务器上运行我自己的freegeoip实例》经验,是哪儿的问题? ... [详细]
  • 如何解决《使用golangwebserver,网站的根目录在哪里映射到文件系统?》经验,为你挑选了1个好方法。 ... [详细]
  • 如何解决《如何在Golang中读取和写入文件concurent?》经验,为你挑选了1个好方法。 ... [详细]
  • Afterdoingsomesearchhere,Ifoundnexttonoquestionsondevelopingawebserver.在这里做了一些搜索后,我 ... [详细]
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社区 版权所有