The default hosting URL is http://localhost:5000.
The hosting URL(s) can be changed in the following ways, multiple URLs separetd by semi-colon are allowed:
-
command line
DpeNanoServices.exe --urls="http://localhost:7080;https://localhost:7443" -
environment variable
set ASPNETCORE_URLS=http://localhost:7080;https://localhost:7443 -
appsettings.json file
{ ... "Kestrel": { "Endpoints": { "Http": { "Url": "http://localhost:5000" }, "Https": { "Url": "https://localhost:5001" } } } ... }
Using https in a hosting URL requires to specify a certificate. See Specifying certificates for HTTPS
Examples
-
“http://localhost:5000”
-
“http://dpe.davidsystems-test.com:80”
-
“http://192.168.40.40:5000” results in listening on a specific network interface using IP v4
-
“http://*:5000” results in listening on http://[::]:5000 = all network interfaces using IP v6
-
“http://+:5000” results in listening on http://[::]:5000 = all network interfaces using IP v6
-
“http://0.0.0.0:5000” results in listening on http://0.0.0.0:5000 = all network interfaces using IP v4
-
“http://+:5000;http://0.0.0.0:5000” results in listening on port 5000 for all network interfaces IP v4 and v6
Links
Further information can be found at Microsoft under https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-7.0