ASP.NET 5 MVC:无法连接到 Web 服务器“IIS Express" [英] ASP.NET 5 MVC: unable to connect to web server 'IIS Express'
问题描述
我在做什么:
- 开放 Visual Studio 社区 2015
- 文件 -> 新建 -> 项目
- 在 Visual C# 下:Web -> ASP.NET Web 应用程序
- 网络应用程序
- 对于弹出错误无法连接到网络服务器IIS Express",请按 f5."
删除位于 DocumentsIISExpressconfig
中的 applicationhost.config
不会更改错误消息.(在 program files
和 program files (x86)
中还有一个 IISExpress
文件夹.)
Deleting applicationhost.config
, located in DocumentsIISExpressconfig
, doesn't change the error message. (There's also an IISExpress
folder in program files
and program files (x86)
.)
我注意到的东西,我不知道是不是有问题:
Something I noticed, and I don't know if it's a problem:
未找到引用文件lib/jquery-validation/jquery.validate.js".
Referenced file 'lib/jquery-validation/jquery.validate.js' not found.
我得到了一个带有 rawcap 的转储,但我在那里没有注意到太多.部分内容:
I got a dump with rawcap but I don't notice much in there. Some of what was there:
"Framework":{"FrameworkName":"DNXCore,Version=v5.0","FriendlyName":"DNX Core 5.0","ShortName":"dnxcore50","RedistListPath":null}
"Framework":{"FrameworkName":"DNXCore,Version=v5.0","FriendlyName":"DNX Core 5.0","ShortName":"dnxcore50","RedistListPath":null}
我没有发现问题,但我有网络数据,如果这有助于找出我无法连接到 Web 服务器的原因.我立即收到一个 RST,ACK
,所以我猜端口已经关闭,无论这个网络服务器是什么,都没有被设置.
I don't notice a problem, but I have the network data if that can help figure out why I cannot connect to the web server. I get a RST,ACK
immediately so I'm guessing the port is closed and whatever this web server is, isn't being setup.
有关此问题的更多信息:800700c1 错误来自/trace:error
More on this problem: 800700c1 error from /trace:error
我试过了:
- 删除 applicationhost.config(并更改端口号)
- 以管理员身份运行 Visual Studio
- 删除文档中的 IISExpress 文件夹(更改错误消息,直到文件夹重新安装)
- 关闭和打开 ssl,将 url 复制到启动框.(注意:我没有使用 ssl)
- 清除所有 sfc/scannow 错误
- 使用 x86 版本和 64 位版本启动 iisexpress
推荐答案
在为 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:
- 删除
YourSolutionFolder\.vsconfigapplicationhost.config
文件(注意:.vs 是隐藏文件夹) - 打开Visual Studio,右击网站>属性 >调试选项卡Web 服务器设置 >应用网址 - 更改端口号.
- Delete
YourSolutionFolder\.vsconfigapplicationhost.config
file (note: .vs is a hidden folder) - 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.
这篇关于ASP.NET 5 MVC:无法连接到 Web 服务器“IIS Express"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!