4

使用该服务时,我正在尝试在不同的端口上测试运行 .net 核心。

但是,我不断收到状态码为 140 的错误。

这发生在我的两次尝试中:

1)在服务文件中 添加 --server.urls= http://0.0.0.0:555 2)在 Program.cs 中ExecStart=/usr/bin/dotnet /dotnetcore/published/TestingWebApi.dll 添加 UseUrls(" http://0.0.0.0:555 ")

当我使用 dotnet run --server.urls=http:0.0.0.0:555它工作的代码手动运行它时。

有人设法使用该服务获得它吗?

4

1 回答 1

0

使用以下

ExecStart=/usr/bin/dotnet /dotnetcore/published/TestingWebApi.dll --urls http://localhost:5002
于 2021-08-12T13:29:41.513 回答