无法启动 IIS Express:尝试确定进程 ID 时出错

Can't Start IIS Express: An error occurred attempting to determine the process id

当我尝试启动我的 ASP.Net Core 1.1 应用程序时,我收到以下错误:

An error occurred attempting to determine the process id of Blah.exe which is hosting your application. An error occurred while sending the request.


我在 `launchSettings.json' 中将 applicationUrl 端口号从 44300 更改为 44301 然后我是能够启动它。

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

为什么更改端口# 可以正常工作?我在哪里可以找到它无法启动的原因?

我 运行 TCPViewer 我没有看到 44300 在使用。

卸载并re-install of IIS Express修复它。

原来端口 44300 没有绑定到我的 IIS Express 证书。 Bill Hiebert 按照 this developer community issue.

中的记录解决了这个问题

当我 运行 netsh http show sslcert 时,未列出端口 44300。我卸载并重新安装了 IIS Express,现在它已列出。

SSL Certificate bindings: 
------------------------- 

IP:port                      : 0.0.0.0:44300
Certificate Hash             : somevalue
Application ID               : {someid}
Certificate Store Name       : MY
Verify Client Certificate Revocation : Enabled
Verify Revocation Using Cached Client Certificate Only : Disabled
Usage Check                  : Enabled
Revocation Freshness Time    : 0
URL Retrieval Timeout        : 0
Ctl Identifier               : (null)
Ctl Store Name               : (null)
DS Mapper Usage              : Disabled
Negotiate Client Certificate : Disabled
Reject Connections           : Disabled
Disable HTTP2                : Not Set