A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dotnet/AspNetCore.Docs/issues/25626 below:

appsettings Urls takes precedence over ASPNETCORE_URLS in 6.0.4 · Issue #25626 · dotnet/AspNetCore.Docs · GitHub

Is there an existing issue for this? Describe the bug

Using aspnet 6.0.4 runtime, precedence of appsettings.json Urls and ASPNETCORE_URLS seems to be different compared to previous versions. Specifying ASPNETCORE_URLS environment variable does not override the url provided in appsettings.json Urls property. Before 6.0.4, ASPNETCORE_URLS would have been used over Urls in appsettings.json .

I would assume that the order that these settings are overriden in is the same as for regular settings: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-6.0#default-configuration

Based on those, environment variables are applied after appsettings.

I am guessing this is related to dotnet/aspnetcore#39836 which meant to fix in-code overriding of any configuration value. Also, while that issue is tagged with 6.0.3, based on comment dotnet/aspnetcore#40614 (comment) it looks like it was shipped as part of 6.0.4, which is a bit confusing.

Expected Behavior

ASPNETCORE_URLS is used instead of appsettings.json Urls.

Steps To Reproduce
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://[::]:5300

@Rick-Anderson EDIT following lines

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4