且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ASP.NET 5 MVC:无法连接到 Web 服务器“IIS Express"

更新时间:2023-02-15 23:07:25

在为 Visual Studio 2015 安装 Update 2 后,我开始遇到同样的错误.我尝试了以上所有方法,但都没有运气.但是,我找到了一个适合我的解决方案:

After installing Update 2 for Visual Studio 2015 I started getting the same error. I tried everything above with no luck. However, I found a solution that works for me:

  1. 删除YourSolutionFolder\.vsconfigapplicationhost.config 文件(注意:.vs 是隐藏文件夹)
  2. 打开Visual Studio,右击网站>属性 >调试选项卡Web 服务器设置 >应用网址 - 更改端口号.
  1. Delete YourSolutionFolder\.vsconfigapplicationhost.config file (note: .vs is a hidden folder)
  2. Open Visual Studio, right-click on web site > Properties > Debug tab > Web Server Settings > App URL - change port number.

如果您将 IIS 配置为使用相同的端口,(停止应用程序/使用不同的端口)并重试.

If you have IIS configured to use the same port, (stop the application / use different port) and try again.