Ser*_*rge 9 .net visual-studio asp.net-core visual-studio-2019 .net-5
我有一个 asp.net core (.net5) 项目,当我启动它时,它会在延迟后系统地抛出错误,然后关闭调试。
我有以下启动设置:
{
"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:50868",
"sslPort": 44363
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Kestrel": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我以“Kestrel”的身份在调试模式下启动项目
发生一个或多个错误。
无法启动调试适配器。输出窗口中可能会提供其他信息。
无法连接到运行时进程,10000 毫秒后超时 - (原因:无法连接到目标:连接 ECONNREFUSED 127.0.0.1:55743)。
看起来它确实尝试连接到随机端口,就像127.0.0.1:55743项目设置为在https://localhost:50015000 或 5000 处
启动浏览器时一样
似乎与此问题相关https://github.com/dotnet/aspnetcore/issues/28113
附言。调试在Edge上运行良好(我通常在Chrome中工作),我想如果你遇到这样的问题,需要更改浏览器......
Ser*_*rge 26
I tried several solutions, not sure what one really helped, but you can try one the following:
Change the default launch browser to see if it helps (say, launch in Edge or Firefox instead of Chrome)
uncheck the "launchbrowser" in the project debug settings, launch the debug and then open manually your startup link (localhost or other you configured to launch)
open your resources monitor and check if the port you try to open is not already taken by another process (open TaskManager, go to Performance tab and in the bottom ov the window you have the resources monitor. Alternatively launch the "resmon.exe" from command line. Then go to network tab and the last "Ports".
| 归档时间: |
|
| 查看次数: |
15478 次 |
| 最近记录: |