Code for hosting and starting up an ASP.NET Core application.
Switch branches/tags
Clone or download
davidfowl Added support for generic host based IWebHostBuilder (#1580)
- This adds an implementation of IWebHostBuilder as a facade over the IHostBuilder.
This removes the 2 container issue by executing the Startup.ConfigureServies and Startup.ConfigureContainer inline as part of building the IHostBuilder.
- The implementation is highly compatible implementation since it exposes the same IWebHostBuilder interface.
Existing extensions mostly work.
- There are some caveats with this approach.
    - Injecting services into Startup is not extremely constrained to the
    services availble on HostBuilderContext. This includes the IHostingEnvironment
    and the IConfiguration.
    - IStartup is broken when using this pattern because it isn't composable.
    - The IStartupConfigureServicesFilter and IStartupConfigureContainer The before
    and after filters added in 2.1 are also broken  because there's a single container (it could maybe be fixed by downcasting and doing something specific on the GenericHostBuilder instance).
    - Calling into IWebHostBuilder.Build will throw a NotSupportedException since
    this implementation is just a facade over the IHostBuilder.
Latest commit cfe9b26 Nov 13, 2018
Permalink
Failed to load latest commit information.
.vsts-pipelines/builds [automated] Change default branch to master Jul 2, 2018
build Update dependencies.props Oct 7, 2018
samples Added support for generic host based IWebHostBuilder (#1580) Nov 14, 2018
shared/Internal.WebHostBuilderFactory.Sources Rename WebHostBuilderFactory (#1505) Jul 25, 2018
src Added support for generic host based IWebHostBuilder (#1580) Nov 14, 2018
test Added support for generic host based IWebHostBuilder (#1580) Nov 14, 2018
.appveyor.yml [automated] Change default branch to master Jul 2, 2018
.gitattributes Update bootstrappers to use the compiled version of KoreBuild Jul 25, 2017
.gitignore Pin tool and package versions to make build more repeatable Oct 31, 2017
.travis.yml [automated] Change default branch to master Jul 2, 2018
CONTRIBUTING.md Update CONTRIBUTING.md Jul 24, 2018
Directory.Build.props automated: bulk infrastructure updates. Update bootstrapper scripts a… Sep 29, 2018
Directory.Build.targets Upgrade to netcoreapp22 (#1410) May 8, 2018
Hosting.sln Sample generic host using MSMQ (#1381) Apr 30, 2018
LICENSE.txt Update LICENSE.txt Sep 27, 2018
NuGet.config Use MSBuild to set NuGet feeds instead of NuGet.config Nov 20, 2017
NuGetPackageVerifier.json Rename WebHostBuilderFactory (#1505) Jul 25, 2018
README.md Asp.Net Core update to readme Mar 10, 2016
build.cmd Update bootstrappers Oct 9, 2017
build.sh Update bootstrappers Oct 9, 2017
korebuild-lock.txt Update dependencies.props Oct 7, 2018
korebuild.json [automated] Change default branch to master Jul 2, 2018
run.cmd Update bootstrappers Oct 9, 2017
run.ps1 automated: bulk infrastructure updates. Update bootstrapper scripts a… Sep 29, 2018
run.sh automated: bulk infrastructure updates. Update bootstrapper scripts a… Sep 29, 2018
version.props Bumping version from 2.2.0 to 3.0.0 Jun 28, 2018

README.md

Hosting

AppVeyor: AppVeyor

Travis: Travis

The Hosting repo contains code required to host an ASP.NET Core application, it is the entry point used when self-hosting an application.

This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.