Skip to content

Commit 3216eeb

Browse files
authored
Merge pull request #35306 from dotnet/main
2 parents 5fdf1b7 + 71cf063 commit 3216eeb

File tree

3 files changed

+27
-29
lines changed

3 files changed

+27
-29
lines changed

aspnetcore/blazor/hybrid/security/maui-blazor-web-identity.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,10 @@ In `MauiBlazorWeb/MauiProgram.cs`, core functionality is added by calling <xref:
210210
builder.Services.AddAuthorizationCore();
211211
```
212212

213-
Registration of the app's custom <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> (`MauiAuthenticationStateProvider`):
213+
The app's custom <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> (`MauiAuthenticationStateProvider`) is registered in `MauiProgram.cs`:
214214

215215
```csharp
216-
builder.Services.AddScoped<MauiAuthenticationStateProvider,
217-
MauiAuthenticationStateProvider>();
216+
builder.Services.AddScoped<MauiAuthenticationStateProvider>();
218217
```
219218

220219
Use the `MauiAuthenticationStateProvider` when the app requires an <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider>:

aspnetcore/fundamentals/logging/index/samples/6.x/TodoApiDTO/Pages/About.cshtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@
44
ViewData["Title"] = "About page";
55
}
66
<h2>@ViewData["Title"]</h2>
7-
<h3>@Model.Message</h3>
8-

aspnetcore/fundamentals/servers/kestrel/http3.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,38 @@ uid: fundamentals/servers/kestrel/http3
2020
> [!IMPORTANT]
2121
> Apps configured to take advantage of HTTP/3 should be designed to also support HTTP/1.1 and HTTP/2.
2222
23-
## HTTP/3 requirements
24-
25-
HTTP/3 has different requirements depending on the operating system. If the platform that Kestrel is running on doesn't have all the requirements for HTTP/3, then it's disabled, and Kestrel will fall back to other HTTP protocols.
26-
27-
### Windows
23+
## HTTP/3 benefits
2824

29-
* Windows 11 Build 22000 or later OR Windows Server 2022.
30-
* TLS 1.3 or later connection.
25+
`HTTP/3`:
3126

32-
### Linux
27+
* Is the latest version of the Hypertext Transfer Protocol.
28+
* Builds on the strengths of `HTTP/2` while addressing some of its limitations, particularly in terms of performance, latency, reliability, and security.
3329

34-
* `libmsquic` package installed.
30+
+---------------+-------------------------+-------------------------+
31+
| Feature | `HTTP/2` | `HTTP/3` |
32+
+---------------+-------------------------+-------------------------+
33+
| Transport | Uses [TCP](https://developer.mozilla.org/docs/Glossary/TCP) | Uses [QUIC](https://www.rfc-editor.org/rfc/rfc9000.html) |
34+
| Layer | | |
35+
| Connection | Slower due to TCP + TLS | Faster with 0-RTT QUIC |
36+
| Setup | handshake | handshakes |
37+
| Head-of-Line | Affected by TCP-level | Eliminated with QUIC |
38+
| Blocking | blocking | stream multiplexing |
39+
| Encryption | TLS over TCP | TLS is built into QUIC |
40+
+---------------+-------------------------+-------------------------+
3541

36-
`libmsquic` is published via Microsoft's official Linux package repository at `packages.microsoft.com`. To install this package:
3742

38-
1. Add the `packages.microsoft.com` repository. See [Linux Software Repository for Microsoft Products](/windows-server/administration/linux-package-repository-for-microsoft-software) for instructions.
39-
2. Install the `libmsquic` package using the distro's package manager. For example, `apt install libmsquic=1.9*` on Ubuntu.
43+
The key differences from `HTTP/2` to `HTTP/3` are:
4044

41-
**Note:** .NET 6 is only compatible with the 1.9.x versions of libmsquic. Libmsquic 2.x is not compatible due to breaking changes. Libmsquic receives updates to 1.9.x when needed to incorporate security fixes.
45+
* **Transport Protocol**: `HTTP/3` uses QUIC instead of TCP. QUIC offers improved performance, lower latency, and better reliability, especially on mobile and lossy networks.
46+
* **Head-of-Line Blocking**: `HTTP/2` can suffer from head-of-line blocking at the TCP level, where a delay in one stream can affect others. `HTTP/3`, with QUIC, provides independent streams, so packet loss in one stream doesn't stall others.
47+
* **Connection Establishment**: `HTTP/3` with QUIC can establish connections faster, sometimes in zero round-trip time (0-RTT) for returning clients, as it combines transport and encryption handshakes.
48+
* **Encryption**: `HTTP/3` mandates TLS 1.3 encryption, providing enhanced security by default, whereas it's optional in `HTTP/2`.
49+
* **Multiplexing**: While both support multiplexing, `HTTP/3`'s implementation with QUIC is more efficient and avoids the TCP-level head-of-line blocking issues.
50+
* **Connection Migration**: QUIC in `HTTP/3` allows connections to persist even when a client's IP address changes (like switching from Wi-Fi to cellular), improving mobile user experience.
4251

43-
### macOS
52+
## HTTP/3 requirements
4453

45-
HTTP/3 isn't currently supported on macOS and may be available in a future release.
54+
HTTP/3 uses QUIC as its transport protocol. The ASP.NET Core implementation of HTTP/3 depends on [MsQuic](https://github.com/microsoft/msquic) to provide QUIC functionality. As a result, ASP.NET Core support of HTTP/3 depends on MsQuic platform requirements. For more information on how to install **MsQuic**, see [QUIC Platform dependencies](/dotnet/fundamentals/networking/quic/quic-overview#platform-dependencies). If the platform that Kestrel is running on doesn't have all the requirements for HTTP/3, then it's disabled, and Kestrel will fall back to other HTTP protocols.
4655

4756
## Getting started
4857

@@ -71,15 +80,7 @@ HTTP/3 is discovered as an upgrade from HTTP/1.1 or HTTP/2 via the [`alt-svc`](h
7180
* Set [`HttpRequestMessage.Version`](xref:System.Net.Http.HttpRequestMessage.Version) to 3.0, or
7281
* Set [`HttpRequestMessage.VersionPolicy`](xref:System.Net.Http.HttpRequestMessage.VersionPolicy) to [`HttpVersionPolicy.RequestVersionOrHigher`](xref:System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher).
7382

74-
## HTTP/3 benefits
75-
76-
HTTP/3 uses the same semantics as HTTP/1.1 and HTTP/2: the same request methods, status codes, and message fields apply to all versions. The differences are in the underlying transport. Both HTTP/1.1 and HTTP/2 use TCP as their transport. HTTP/3 uses a new transport technology developed alongside HTTP/3 called [QUIC](https://datatracker.ietf.org/doc/html/draft-ietf-quic-transport-34).
77-
78-
HTTP/3 and QUIC have a number of benefits compared to HTTP/1.1 and HTTP/2:
79-
80-
* Faster response time of the first request. QUIC and HTTP/3 negotiates the connection in fewer round-trips between the client and the server. The first request reaches the server faster.
81-
* Improved experience when there is connection packet loss. HTTP/2 multiplexes multiple requests via one TCP connection. Packet loss on the connection affects all requests. This problem is called "head-of-line blocking". Because QUIC provides native multiplexing, lost packets only impact the requests where data has been lost.
82-
* Supports transitioning between networks. This feature is useful for mobile devices where it is common to switch between WIFI and cellular networks as a mobile device changes location. Currently, HTTP/1.1 and HTTP/2 connections fail with an error when switching networks. An app or web browsers must retry any failed HTTP requests. HTTP/3 allows the app or web browser to seamlessly continue when a network changes. Kestrel doesn't support network transitions in .NET 8. It may be available in a future release.
83+
For more information on how to use HTTP/3 with `HttpClient`, see [HTTP/3 with .NET](/dotnet/core/extensions/httpclient-http3).
8384

8485
:::moniker-end
8586

0 commit comments

Comments
 (0)