You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 19, 2018. It is now read-only.
I tried to put kestrel urls into a separate json file so I don't have to recompile the project every time I change urls but the problem is that the ConfigureAppConfiguration doesn't work. I don't want to use the UseConfigurationMethod because I can't find a way to get the IHostingEnvironment to set up different settings for different environment. Putting these configurations in the Startup class doesn't seem to work either.
hosting.json
Doing it this way works:
dotnet run:
Now listening on: http://[::]:4000
Now listening on: http://[::]:5000
Now listening on: http://[::]:5001
Now listening on: http://[::]:5002
Now listening on: http://[::]:5003
But doing this will not:
dotnet run:
Now listening on: http://localhost:5000
If I do the first method, how do I get the Hosting Environment?
From @whizkidwwe1217 on February 25, 2018 2:27
I tried to put kestrel urls into a separate json file so I don't have to recompile the project every time I change urls but the problem is that the ConfigureAppConfiguration doesn't work. I don't want to use the UseConfigurationMethod because I can't find a way to get the IHostingEnvironment to set up different settings for different environment. Putting these configurations in the Startup class doesn't seem to work either.
hosting.json

Doing it this way works:

dotnet run:
But doing this will not:

dotnet run:
If I do the first method, how do I get the Hosting Environment?

Copied from original issue: dotnet/aspnetcore#2903
The text was updated successfully, but these errors were encountered: