5

I'm trying to test running .net core on a different port when using the service.

However, I keep on getting an error with a status code 140.

This occurs in my two attempts :

1) adding --server.urls=http://0.0.0.0:555 in the service file ExecStart=/usr/bin/dotnet /dotnetcore/published/TestingWebApi.dll 2) adding UseUrls("http://0.0.0.0:555") in the Program.cs

When I run it manually using the code dotnet run --server.urls=http:0.0.0.0:555 it works.

Anybody has managed to get it using the service?

Jeremy Loh
  • 175
  • 1
  • 9

1 Answers1

2

use the following

ExecStart=/usr/bin/dotnet /dotnetcore/published/TestingWebApi.dll --urls http://localhost:5002