Closed kdaveid closed 6 years ago
Note this has side effects. Kestrel's approach does not work with some DI containers because it relies on ordering. Capturing your dependencies via closure is more reliable.
Yes, I get that. I'm building a webapp that can be started in different ways (servers). I thought it's odd that the configuration are not the same.
Feel free to close it.
In order to configure HttpSys with
WebHostBuilder
it would help to have access toIServiceProvider
within.UseHttpSys(Action<HttpSysOptions> options)
extension method. I.e. it would be nice to extractIConfiguration
and use app settings from there.This would be streamlined to Kestrel
KestrelServerOptions
https://github.com/aspnet/KestrelHttpServer/blob/rel/2.0.0/src/Microsoft.AspNetCore.Server.Kestrel.Core/KestrelServerOptions.cs#L51.HttpSysOptions: https://github.com/aspnet/HttpSysServer/blob/rel/2.0.0/src/Microsoft.AspNetCore.Server.HttpSys/HttpSysOptions.cs