From 88517d0ab6e99221c7cbda238688dc3e8de51ea0 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Mon, 13 Dec 2021 12:29:23 +1300 Subject: [PATCH] Update troubleshoot.md (#24278) Co-authored-by: Luke Latham <1622880+guardrex@users.noreply.github.com> --- aspnetcore/grpc/troubleshoot.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aspnetcore/grpc/troubleshoot.md b/aspnetcore/grpc/troubleshoot.md index 9a896aa7b4..7310186330 100644 --- a/aspnetcore/grpc/troubleshoot.md +++ b/aspnetcore/grpc/troubleshoot.md @@ -76,7 +76,6 @@ There are some additional requirements to call insecure gRPC services depending * .NET 5 or later requires [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) version 2.32.0 or later. * .NET Core 3.x requires additional configuration. The app must set the `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch to `true`: - ```csharp // This switch must be set before creating the GrpcChannel/HttpClient. AppContext.SetSwitch( @@ -89,6 +88,9 @@ There are some additional requirements to call insecure gRPC services depending The `System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport` switch is only required for .NET Core 3.x. It does nothing in .NET 5 and isn't required. +> [!IMPORTANT] +> Insecure gRPC services must be hosted on a HTTP/2-only port. For more information, see [ASP.NET Core protocol negotiation](xref:grpc/aspnetcore#protocol-negotiation). + ## Unable to start ASP.NET Core gRPC app on macOS Kestrel doesn't support HTTP/2 with TLS on macOS and older Windows versions such as Windows 7. The ASP.NET Core gRPC template and samples use TLS by default. You'll see the following error message when you attempt to start the gRPC server: