Skip to content

Removed extensibility for DefaultHttpContext #338

@davidfowl

Description

@davidfowl

As part of performance improvements made to ASP.NET Core 3.0 (dotnet/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 dotnet/aspnetcore#6534

[This announcement has been migrated to: dotnet/docs#14771]

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.0.0Announcements related to ASP.NET Core 3.0AnnouncementBreaking changeDocumentedThe breaking change has been published to the .NET Core docsMigrated

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions