我在做什么:

开放Visual Studio社区2015 File ->新建->项目 在Visual c#: Web -> ASP下。NET Web应用程序 Web应用程序 并按f5弹出错误“无法连接到web服务器'IIS Express'”。

删除applicationhost。config,位于Documents\IISExpress\config中,不会更改错误消息。(程序文件和程序文件(x86)中也有一个IISExpress文件夹。)

我注意到一件事,我不知道这是不是问题

引用文件'lib/jquery-validation/jquery.validate.js'未找到。

我有一堆破烂,但我没注意到里面有什么。这里有一些内容:

“框架”:{“框架”

我没有注意到问题,但我有网络数据,如果这可以帮助找出为什么我不能连接到web服务器。我立即得到一个RST,ACK,所以我猜端口是关闭的,不管这个web服务器是什么,没有被设置。

关于这个问题的更多信息:800700c1 error from /trace:error

我试过了:

删除applicationhost。配置(和更改端口号) 以管理员身份运行visual studio 删除文档中的IISExpress文件夹(更改错误消息,直到文件夹重新安装) 切换SSL关闭和打开,复制url到启动框。(注意:我没有使用ssl) 清除所有SFC /scannow错误 从x86版本和64位版本启动iisexpress


当前回答

As Svenmarim already stated, this mostly occurs because the ip adress is already in use. This answer and its comments from the visualstudio developer community pointed me to the right direction. In my case i was trying to access my local IISExpress instance from my local network and therefore binded my ip adress with the same port which uses my IISExpress instance via netsh http add urlacl url=http://192.168.1.42:58938/ user=everyone After removing this binding via netsh http delete urlacl url=http://192.168.1.42:58938/ it worked again.

其他回答

当我在applicationhost中添加一个新的绑定时,我的绑定就会发生。配置,以管理员身份运行解决了这个问题。

在安装Visual Studio 2015更新2后,我开始得到同样的错误。我尝试了以上所有方法,但都没有成功。然而,我找到了一个适合我的解决方案:

删除YourSolutionFolder \ \ .vs \ config \ applicationhost。配置文件(注意:.vs是一个隐藏文件夹) 打开Visual Studio,右键单击网站>属性>调试选项卡> web服务器设置>应用URL -更改端口号。

如果您已将IIS配置为使用相同端口,(停止应用程序/使用不同端口),然后重试。

在我的情况下,由于某种原因,它是脉冲安全vpn绊倒了Visual Studio 2019社区版!解决方法是暂停vpn,启动调试解决方案,然后恢复vpn连接。

以管理员权限运行VisualStudio并运行项目。然后关闭VisualStudio和所有错误,并以正常用户再次运行VisualStudio。

这对我很有用。

看起来IIS必须写一些东西到一些具有管理权限的配置(端口80不适合普通用户,但端口6767工作正常)。

我可以通过改变一个东西来切换这个错误。在我的ASP。Net Core 1.0 RC2 Web应用程序项目的启动设置。json文件:

  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "https://localhost:18177/",
      "sslPort": 0
    }
  },

to

  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:18177/",
      "sslPort": 0
    }
  },

我已经更改为https,试图使用该协议运行项目。显然,这里不适合做这种改变。我怀疑它在同一个端口上创建了多个绑定,IIS Express不喜欢这样。