|
| 1 | +--- |
| 2 | +title: Use ASP.NET Core with HTTP/2 on IIS |
| 3 | +author: rick-anderson |
| 4 | +description: Learn how to use HTTP/2 features with IIS. |
| 5 | +monikerRange: '>= aspnetcore-5.0' |
| 6 | +ms.author: riande |
| 7 | +ms.custom: mvc |
| 8 | +ms.date: 01/13/2020 |
| 9 | +no-loc: ["ASP.NET Core Identity", cookie, Cookie, Blazor, "Blazor Server", "Blazor WebAssembly", "Identity", "Let's Encrypt", Razor, SignalR] |
| 10 | +uid: host-and-deploy/iis/protocols |
| 11 | +--- |
| 12 | + |
| 13 | +# Use ASP.NET Core with HTTP/2 on IIS |
| 14 | + |
| 15 | +By [Justin Kotalik](https://github.com/jkotalik) |
| 16 | + |
| 17 | +[HTTP/2](https://httpwg.org/specs/rfc7540.html) is supported with ASP.NET Core in the following IIS deployment scenarios: |
| 18 | + |
| 19 | +* Windows Server 2016 or later / Windows 10 or later |
| 20 | +* IIS 10 or later |
| 21 | +* TLS 1.2 or later connection |
| 22 | +* When [hosting out-of-process](xref:host-and-deploy/iis/index#out-of-process-hosting-model): Public-facing edge server connections use HTTP/2, but the reverse proxy connection to the [Kestrel server](xref:fundamentals/servers/kestrel) uses HTTP/1.1. |
| 23 | + |
| 24 | +For an in-process deployment when an HTTP/2 connection is established, [`HttpRequest.Protocol`](xref:Microsoft.AspNetCore.Http.HttpRequest.Protocol*) reports `HTTP/2`. For an out-of-process deployment when an HTTP/2 connection is established, [`HttpRequest.Protocol`](xref:Microsoft.AspNetCore.Http.HttpRequest.Protocol*) reports `HTTP/1.1`. |
| 25 | + |
| 26 | +For more information on the in-process and out-of-process hosting models, see <xref:host-and-deploy/aspnet-core-module>. |
| 27 | + |
| 28 | +HTTP/2 is enabled by default for HTTPS/TLS connections. Connections fall back to HTTP/1.1 if an HTTP/2 connection isn't established. For more information on HTTP/2 configuration with IIS deployments, see [HTTP/2 on IIS](/iis/get-started/whats-new-in-iis-10/http2-on-iis). |
| 29 | + |
| 30 | +## Advanced HTTP/2 features to support gRPC |
| 31 | + |
| 32 | +Additional HTTP/2 features in IIS support gRPC, including support for response trailers and sending reset frames. |
| 33 | + |
| 34 | +Requirements to run gRPC on IIS: |
| 35 | + |
| 36 | +* In-process hosting. |
| 37 | +* Windows 10, OS Build 20300.1000 or later. May require use of Windows Insider Builds. |
| 38 | +* TLS 1.2 or later connection |
| 39 | + |
| 40 | +### Trailers |
| 41 | + |
| 42 | +[!INCLUDE[](~/includes/trailers.md)] |
| 43 | + |
| 44 | +### Reset |
| 45 | + |
| 46 | +[!INCLUDE[](~/includes/reset.md)] |
0 commit comments