Review uses of IServiceScope to ensure registering IAsyncDisposable services doesn't cause exceptions
Open
affected-few
area-hosting
area-networking
enhancement
severity-minor
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
https://github.com/aspnet/AspNetCore/issues/12918 was specific to Blazor but I suspect there are a few other places where `IServiceScope` is used with just `using` in ASP.NET Core:
- https://github.com/aspnet/AspNetCore/blob/master/src/DataProtection/EntityFrameworkCore/src/EntityFrameworkCoreXmlRepository.cs#L43
- https://github.com/aspnet/AspNetCore/blob/master/src/Hosting/Hosting/src/Internal/ConfigureBuilder.cs#L26
Should someone do a global search to detect and address them?
Contributor guide
Assessment
This issue has not been assessed yet.