VS2017 运行 组合中的 IISExpress 或 MyAPI 有什么区别?

What is the difference between IISExpress or MyAPI in the VS2017 Run combo?

我正在研究 IdentityServer4 示例应用程序 我在 运行 组合中看到 2 个选项 当我 select 它们和 运行 时,它们似乎都具有相同的效果。 有什么区别?

这里是launchSettings.json

  {
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:5000/",
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "QuickstartIdentityServer": {
      "commandName": "Project",
      "launchBrowser": true,
      "launchUrl": "http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://localhost:5000/"
    }
  }
}

选项简单地映射到 launchSettings.json 中相应的 "profiles"。

"IIS Express" 使用 IIS Express 作为 运行 您在 Kestrel 上的 Web 应用程序的反向代理,而后者 运行 是您直接在 Kestrel 上的 Web 应用程序。

可以在

中找到更多详细信息

https://blog.lextudio.com/what-should-you-check-when-visual-studio-cannot-debug-asp-net-core-projects-4b5db8c5e129