-
Notifications
You must be signed in to change notification settings - Fork 522
Have you broken Kestrel configuration? #1442 #2495
Comments
2.0 added lots of other ways to configure Kestrel, but the original ways mostly still worked. 2.1 has added even more ways... There is one common confusion in 2.x where people try to use ConfigreAppConfiguration in Main to configure the Urls key, but you need to Configure the host instead. Please show us how you are trying to configure it. |
In Program.cs:
Where ConfigConfiguration does a few config.AddJsonFile... |
The sample you linked to should work. Why are you using ConfigureAppConfiguration instead of UseConfiguration? It's the Urls parameter you're trying to set, correct? Or you could try the new Endpoints config. #2186 |
|
? MaxRequestBufferSize has never been mapped from config, in 1.x or 2.x. Or were you calling Bind? |
No it has not been mapped from config. That is why we put it in our own config and set it in Main as per this example. |
Does the code from SO answer you linked to no longer work? 2.1 should be source compatible with 2.0 with few exceptions. |
It does not work any more. Previously |
There are two builders in that example, a config builder and a web host builder. Make sure you're calling Build on the right one. I'm putting this issue on hold until you post a complete code sample and error stack traces as relevant. None of the code samples or errors you've provided have been complete or matched the complaints you've made. |
|
Issue Title
Have you broken Kestrel configuration?
General
In .Net Core 1.0 in Main you used to be able to '.Build()' on the builder to get the configuration resolved, in order to be able to use configuration in .UseKestrel(...)
Unless I am mistaken, that is now not possible in 2.1 - one can only use constants or read from files by hand.
Am I mistaken?
cheers
Matt
(upon advice, copied from here)
The text was updated successfully, but these errors were encountered: