[release/6.0-preview7] [QUIC] Remove AppContext switch from S.N.Quic #56077
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #56027 to release/6.0-preview7
/cc @ManickaP
Customer Impact
Short version: ASP.NET cannot deterministically enable System.Net.Quic for their HTTP/3 scenarios, leading to exceptions.
Long version:
System.Net.Quic will be internal-only in .NET 6.0 (as implementation detail of client and server HTTP/3). We want to prevent customers from accidentally using it.
We have implemented 2 levels of protection for System.Net.Quic to make it INTERNAL -- we removed ref assemblies from public and we used AppContext switch which is off by default (also used for HTTP/3 in HttpClient).
ASP.NET uses different mechanism for opt-in for HTTP/3 in .NET 6.0. Their mechanism cannot safely and deterministically turn on the System.Net.Quic AppContext as it relies on order of type initializers. Therefore we agreed to remove the AppContext protection for System.Net.Quic (it is in place for HttpClient's HTTP/3 still) and leave only one level of protection for System.Net.Quic being internal (removed ref assemblies).
Testing
CI
Risk
Low