-
Notifications
You must be signed in to change notification settings - Fork 109
Add new WebHost static API to Microsoft.AspNetCore meta-package with opinionated defaults #24
Comments
Adding
|
@lutzroeder we don't have a concept of "handlers" in ASP.NET Core (although I course understand the intent) but the bigger issue is a method like that won't compose properly with the rest of the methods on |
@JunTaoLuo is this done now? |
@JunTaoLuo @davidfowl maybe we should add the debug logger by default too. Originally I think we planned to just merge it into the core logging package and always be on but it could just be enabled by this now. Thoughts? |
I still need to add tests. I only merged the changes to unblock @CesarBS. I think we also found a bug that need to be fixed. |
@JunTaoLuo bugs? 🔥 |
Before closing the issue, I will also need to resolve the correct ApplicationName and pass it along to the builder when we wrap the RequestDelegate at https://github.com/aspnet/MetaPackages/blob/dev/src/Microsoft.AspNetCore/WebHost.cs#L38. Otherwise the correct ApplicationName gets overwritten to |
@JunTaoLuo please ensure the |
Functional tests added, and follow up issues have been filed. |
Uh oh!
There was an error while loading. Please reload this page.
Add new static API
WebHost
to support creating opinionated instances ofIWebHost
andIWebHostBuilder
which default the following over and above the usual defaults:appsettings.json
andappsettings.[environment].json
tooIStartupFilter
by default whenIHostingEnvironment.IsDevelopment()
There would be methods that allow building and starting an
IWebHost
with one call, and another that allows creating anIWebHostBuilder
for more advanced scenarios, e.g. setting up configuration, logging, etc.They would be used like so:
Some slightly more audacious ideas
Add overloads that allow easy creation of an app that uses a single routed middleware:
Used like so:
@davidfowl @glennc
aspnet/Hosting#991
The text was updated successfully, but these errors were encountered: