visual-studio – 尝试连接到运行IISExpress的localhost时如何解决ERR_CONNECTION_REFUSED – 错误502(无法从Visual Studio调试)?
问题:
这是在Windows Server 2008上运行的,几个月前就可以运行了。 我刚刚再次使用这个服务器与VS一起开发工作。
这是用于提供一些测试站点的实时Web服务器。
这在运行Visual Studio时启动,然后启动我的项目以进行调试。
尝试在IISExpress启动时通过localhost:xxxx
启动任何站点(使用配置中的实际端口#来访问不同的站点):
This webpage is not available
ERR_CONNECTION_REFUSED
我已经在这几天了,因为我已经读过其他人有过类似的问题,尝试了我读过的大部分内容,包括将managedruntimeversion
从“v4.0”更改为“v4.0.30319”(我有从来没有必要这样做)并禁用日志记录模块( 此处的所有建议)。
我的hosts
文件中只有两个条目指向内部服务器IP地址。 没有与localhost
相关的IP或引用。
我已经完成了重新安装IIS Express和Visual Studio 2013.我还创建了一个全新的WebApplication
站点来尝试解决这个问题(简单而没有其他复杂的绑定)。
当我旋转Fiddler时,我在页面上看到以下内容:
[Fiddler] The socket connection to localhost failed.
ErrorCode: 10061.
No connection could be made because the target machine actively refused it 127.0.0.1:23162
我已经从IE的LAN连接部分删除了所有代理设置,之前我在VS中获得了一个red-x弹出窗口,表明IISExpress无法启动 。
这不是SSL与非SSL的问题。
我安装了TFS服务器 – 卸载了,以防有一些奇怪的绑定干扰。
我尝试多次删除IISExpress配置/设置文件夹。
当前的applicationhost.config包含:
<site name="WebApplication1" id="4">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\TFS-WorkRepository\Sandbox\WebApplication1\WebApplication1" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:23162:localhost" />
</bindings>
</site>
<siteDefaults>
<logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
<traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
</siteDefaults>
<applicationDefaults applicationPool="Clr4IntegratedAppPool" />
我希望有一个really-stuck
的标签。
请建议离开,因为我不想转向新的服务器。
– 更新 –
在URL栏中,当我输入计算机名称或IP地址时:xxxx我得到ERR_CONNECTION_TIMED_OUT
而不是ERR_CONNECTION_REFUSED
。
This is running on Windows Server 2008 and used to work several months ago.I am just now using this server again for some dev work with VS.This is live web server used to serve up a few test sites as well.This came up when running Visual Studio, then launching my projects for debugging.Trying to launch any site through localhost:xxxx
when IISExpress has been launched (using actual port #’s in the config to access different sites):I have been at this for a few days already, as I have read others have had similar issues, tried most things I have read including changing the managedruntimeversion
from “v4.0” to “v4.0.30319” for .net 4.5 (I have never had to do this before) and disabling the logging module (all suggestions found here ).There are only two entries in my hosts
file that point to internal server IP addresses.No localhost
related IP’s or references.I have gone as far as re-installing IIS Express, and Visual Studio 2013. I also created a brand new WebApplication
site to try to resolve this (simple and no other complicated bindings).When I spin up Fiddler, I see the following on the page:I have removed all proxy settings from IE’s LAN connection section, where before I was getting a red-x popup in VS indicating something like IISExpress could not launch .This is not a matter of SSL vs non SSL.I had TFS Server installed – uninstalled that in case there were some odd bindings that were interfering.I tried deleting the IISExpress config/settings folder several times.Current applicationhost.config contains:I wish there was a tag for really-stuck
.Please suggest away, as I don’t want to go as far as spinning up a new server.— UPDATE —In the URL bar, when I enter the computer name or IP address :xxxx I get the ERR_CONNECTION_TIMED_OUT
rather than ERR_CONNECTION_REFUSED
.