Skip to content

ASPNETCORE_HTTP_PORTS/HTTPS_PORTS not respected #3667

Open
@jander-msft

Description

@jander-msft

Description

The new (to ASP.NET 8) ASPNETCORE_HTTP_PORTS/ASPNETCORE_HTTPS_PORTS environment variables are not respected by .NET Monitor.

Example:

SET ASPNETCORE_HTTP_PORTS=52327
dotnet.exe dotnet-monitor.dll collect
16:24:46 info: Microsoft.Diagnostics.Tools.Monitor.Startup[60]
      Tell us about your experience with dotnet monitor: https://aka.ms/dotnet-monitor-survey
16:24:46 info: Microsoft.Diagnostics.Tools.Monitor.Startup[76]
      Connection mode: Connect
16:24:46 warn: Microsoft.Diagnostics.Tools.Monitor.MonitorApiKeyConfigurationObserver[56]
      API key authentication is not configured. See https://go.microsoft.com/fwlink/?linkid=2187444&clcid=0x409 for more details.
16:24:47 warn: Microsoft.AspNetCore.Server.Kestrel[0]
      Overriding address(es) 'http://*:52327'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead.
16:24:47 info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:52323
16:24:47 info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:52325
16:24:47 info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
16:24:47 info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production

It is true that http://*:52327 was ignored according to the warning. However, it should not have been ignored since the ASPNETCORE_* environment variables should take higher precedence than the command line defaults.

Regression?

No

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions