- Today the request services middleware is responsible for making sure there are request scoped services. This PR tries introduces some breaking changes that are hopefully acceptable in order to gain some performance. - Here are the assumptions this PR makes: - Since this middleware is first in the pipeline, the only thing that can set a default service provider would be the server itself. Since we have no servers that do that I removed that code that tries to noop if there's an existing service provider. - This PR no longer restores the previous service provider feature since it gets replaced every request anyways. Kestrel also clears out the feature on each request so it shouldn't be a problem (in theory). Once again, since this middleware is first, it is the last thing that runs before the server re-gains control on the way out so there's no need to restore anything. - We use the RegisterForDispose method to dispose of the IServiceProvider instead of doing it inline. |
||
|---|---|---|
| build | ||
| samples | ||
| shared/Microsoft.AspNetCore.Hosting.WebHostBuilderFactory.Sources | ||
| src | ||
| test | ||
| .appveyor.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| Directory.Build.props | ||
| Directory.Build.targets | ||
| Hosting.sln | ||
| LICENSE.txt | ||
| NuGet.config | ||
| NuGetPackageVerifier.json | ||
| README.md | ||
| build.cmd | ||
| build.sh | ||
| korebuild-lock.txt | ||
| korebuild.json | ||
| run.cmd | ||
| run.ps1 | ||
| run.sh | ||
| version.props | ||
README.md
Hosting
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.