New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed extensibility for DefaultHttpContext #338

davidfowl opened this Issue Jan 9, 2019 · 0 comments


None yet
1 participant
Copy link

davidfowl commented Jan 9, 2019

As part of performance improvements made to ASP.NET Core 3.0 (aspnet/AspNetCore#6504), we've removed the extensibility of DefaultHttpContext (it is now sealed). This extensibility was provided initially to allow pooling of the HttpContext but it introduced more complexity than necessary and precluded other optimizations. As a result, we decided to remove this extensibility.

If you're using Mock<DefaultHttpContext> in your unit tests, we recommend using Mock<HttpContext> instead.

Please discuss this on aspnet/AspNetCore#6534

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.