简体   繁体   English

即使删除了IISExpress设置,ASP.NET Core 2.0 Web App仍会启动IISExpress而不是Kestrel。

[英]ASP.NET Core 2.0 Web App keeps starting IISExpress instead of Kestrel even though IISExpress settings are removed

Every time I keep starting my ASP.NET Core Web App, it keeps starting IISExpress. 每次我继续启动ASP.NET Core Web App时,它都会一直启动IISExpress。 I click DEBUG (or F5) and i noticed the little IISExpress systray icon show. 我单击DEBUG(或F5),然后注意到显示了IISExpress小系统托盘图标。 I then manually exit it. 然后,我手动退出它。 Also, None of the debug (start/stop/pause) buttons are displayed .. so it's like it's not start-debugging .. but start-running. 另外,没有显示任何调试(开始/停止/暂停)按钮..所以这就像不是开始调试..而是开始运行。

target framework: .NETCore 2.1 目标框架:.NETCore 2.1

Here's my files:- 这是我的文件:

launchSettings.json

{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "profiles": {
    "Kestrel - Accounts.Api": {
      "commandName": "Project",
      "launchBrowser": false,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://localhost:5000"
    },
    "Docker": {
      "commandName": "Docker",
      "launchBrowser": true,
      "launchUrl": "{Scheme}://localhost:{ServicePort}"
    }
  }
}

and here's the project in the solution: 这是解决方案中的项目:

在此处输入图片说明

Another interesting thing to note, if I try and hit the localhost website (the port is some random port, not 5000 ) the site never comes up eventually starts up ... and this is a simple basic site. 还要注意的另一件有趣的事情是,如果我尝试访问localhost网站(端口是一些随机端口,而不是5000 ),则该站点永远不会启动,最终会启动...这是一个简单的基本站点。

Can anyone suggest where I should look/fix, please? 有人可以建议我应该在哪里查看/修复吗?

UPDATE UPDATE

I can run the website 100% fine if i use the CLI. 如果使用CLI,我可以100%罚款地运行网站。 Eg: 例如:

  • (in the folder of the .csproj ) (在.csproj的文件夹中)
  • dotnet build
  • dotnet publish -c DEBUG -o /app
  • dotenet c:\\app\\Accounts.Api.dll

.. and it runs fine with normal stuff outputed to the console... ..并且可以正常运行,并向控制台输出正常内容...

OK - weird. 好-很奇怪 So I ended up doing the following: 所以我最终做了以下事情:

  • removing project from solution. 从解决方案中删除项目。
  • re-adding the project back to the solution 将项目重新添加到解决方案中

and now it works! 现在就可以了!

go figure :/ 去搞清楚 :/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从命令行使用IISExpress启动ASP.net WebApp - Starting a ASP.net WebApp using IISExpress from the command line 带有 IIsExpress 配置文件的 ASP.NET Core 6 文件太大 (413) - ASP.NET Core 6 File too large (413) with IIsExpress Profile 让ASP.Net Core关闭在IISExpress中触发ApplicationStopping事件 - Getting ASP.Net Core shutdown triggering ApplicationStopping event in IISExpress 在 IISExpress 上运行的 ASP.NET Core 应用程序中的 HTTPS 错误 - PR_CONNECT_RESET_ERROR - HTTPS error in ASP.NET Core app running on IISExpress - PR_CONNECT_RESET_ERROR 运行asp.net mvc项目时出现错误“无法启动iisexpress Web服务器” - Error “Unable to launch iisexpress web server” While running asp.net mvc Project 将Asp.Net MVC应用程序附加到C#中的iisexpress - Attach Asp.Net MVC application to iisexpress in C# 为HTTPS配置ASP.NET Core 2.0 Kestrel - Configure ASP.NET Core 2.0 Kestrel for HTTPS Asp.Net Core 2.0 HTTP-> Kestrel上的HTTPS - Asp.Net Core 2.0 HTTP -> HTTPS on Kestrel Asp.Net Core 应用程序使用 Kestrel web 服务器而不是 IIS,为什么? - Asp.Net Core application using the Kestrel web server instead of IIS, why? 带有Kestrel Web服务器的Rasberry PI上Ubuntu上的ASP.NET Core应用程序 - ASP.NET Core app on Ubuntu on Rasberry PI with Kestrel Web Server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM