Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 8, 2025

This PR documents the breaking change introduced in .NET 10 Preview 7 where Microsoft.AspNetCore.HttpOverrides.IPNetwork and ForwardedHeadersOptions.KnownNetworks have been marked as obsolete in favor of System.Net.IPNetwork and ForwardedHeadersOptions.KnownIPNetworks.

The change affects developers using forwarded headers middleware who will now receive compiler warning ASPDEPR005 when using the obsolete APIs:

// Previous behavior - now obsolete
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    KnownNetworks.Add(new(IPAddress.Loopback, 8))
});

// New behavior - recommended approach
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    KnownIPNetworks.Add(new(IPAddress.Loopback, 8))
});

Changes made:

  • Created new breaking change documentation at docs/core/compatibility/aspnet-core/10.0/ipnetwork-knownnetworks-obsolete.md
  • Added ASP.NET Core section to the .NET 10 compatibility overview page
  • Updated the table of contents to include the new ASP.NET Core 10.0 section

The documentation follows the established template and includes comprehensive migration guidance, affected APIs, and code examples to help developers update their applications.

Fixes #47622.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/10.0.md Breaking changes in .NET 10
docs/core/compatibility/aspnet-core/10/ipnetwork-knownnetworks-obsolete.md IPNetwork and ForwardedHeadersOptions.KnownNetworks are obsolete
docs/core/compatibility/toc.yml docs/core/compatibility/toc

Copilot AI changed the title [WIP] Document https://github.com/aspnet/Announcements/issues/523 Document IPNetwork and ForwardedHeadersOptions.KnownNetworks obsolescence for .NET 10 Aug 8, 2025
Copilot AI requested a review from gewarren August 8, 2025 18:23
@gewarren gewarren marked this pull request as ready for review August 8, 2025 22:01
@gewarren gewarren requested a review from a team as a code owner August 8, 2025 22:01
@gewarren gewarren enabled auto-merge (squash) August 12, 2025 18:47
@gewarren gewarren requested review from a team and BrennanConroy August 12, 2025 18:48
@gewarren gewarren merged commit c51fa08 into main Aug 12, 2025
10 checks passed
@gewarren gewarren deleted the copilot/fix-47622 branch August 12, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document https://github.com/aspnet/Announcements/issues/523

3 participants