You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调试ASP.NET Core报错:无法确定dotnet.exe进程ID(非调试可启动)

我已针对该问题调研数小时,目前尝试的所有解决方案均未生效。
我已按照相关帖子的各类指引操作,但问题仍未解决,报错提示为:An error occurred attempting to determine the process id of dotnet.exe which is hosting your application. One or more error occured

当前我的launchSettings.json配置如下:

{
  "iisSettings": {
    "windowsAuthentication": true,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:51763/",
      "sslPort": 44324
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "HydroAuth.Admin": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://localhost:51764/"
    }
  }
}

目前已尝试的操作

  • 通过「管理用户证书」功能删除localhost证书
  • 使用CTRL+F5(不调试启动)可成功运行应用,且已完成证书重装:
    证书重装完成界面截图
  • 尝试禁用SSL后应用完全无法运行,重新启用SSL后仍无法进入调试模式
  • 检查IIS配置未发现异常,端口44324已正常启用
  • 多次重启Visual Studio及个人电脑,问题仍未解决

待确认问题

  • 我是否遗漏了某些显而易见的配置问题?
  • 还有哪些配置项需要进一步排查?

现有约束条件

  • 受前序开发人员的项目架构设计限制,端口号存储在数据库中做合法性校验,无法修改端口配置
  • 不使用IIS Express启动项目时,会触发Microsoft OAuth认证失效,导致账号登出

提前感谢大家提供的建议与解决方案!


内容的提问来源于stack exchange,提问作者BenjaminD

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.26 15:06:20