-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Description
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.
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?
Metadata
Metadata
Assignees
Labels
No labels