WebHostOptions can't be set from HostingStartup activated assemblies #5895
Labels
area-hosting
Includes Hosting
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Needs: Design
This issue requires design work before implementating.
Milestone
WebHostBuilder.Build->BuildCommonServices first creates a new WebHostOptions and reads all of the settings from config. Then it processes HostingStartup assemblies. Because config has already been read, the HostingStartup actions cannot modify any WebHostOptions options like CaptureStartupErrors. Configuring IWebHostBuilder from a HostingStartup assembly will not be equivalent to configuring it in Program.Main if these options cannot be set.
PreferHostingUrls had a similar problem when trying to run in ConfigureServices, so we removed it from WebHostOptions: aspnet/Hosting@a64940a
We've enabled IISIntegration to be auto-injected as a HostingStartup assembly, but it needs to set CaptureStartupErrors.
The text was updated successfully, but these errors were encountered: