Update troubleshoot.md (#24278)

Co-authored-by: Luke Latham <1622880+guardrex@users.noreply.github.com>
pull/24283/head
James Newton-King 2021-12-13 12:29:23 +13:00 committed by GitHub
parent a533cae05a
commit 88517d0ab6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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: