From ac7a60a5612f5ce7602d6970b9f5f922d473c5f4 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Thu, 10 Aug 2023 09:07:28 +0800 Subject: [PATCH] Improve comment in GrpcChannel for WinHttpHandler + OS validation (#2237) --- src/Grpc.Net.Client/GrpcChannel.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Grpc.Net.Client/GrpcChannel.cs b/src/Grpc.Net.Client/GrpcChannel.cs index 84ed7d457..f4ad6f474 100644 --- a/src/Grpc.Net.Client/GrpcChannel.cs +++ b/src/Grpc.Net.Client/GrpcChannel.cs @@ -185,7 +185,15 @@ internal GrpcChannel(Uri address, GrpcChannelOptions channelOptions) : base(addr Log.AddressPathUnused(Logger, Address.OriginalString); } - // Validate the Windows version can support WinHttpHandler. + // Grpc.Net.Client + .NET Framework + WinHttpHandler requires features in WinHTTP, shipped in Windows, to work correctly. + // This scenario is supported in these versions of Windows or later: + // -Windows Server 2022 has partial support. + // -Unary and server streaming methods are supported. + // -Client and bidi streaming methods aren't supported. + // -Windows 11 has full support. + // + // GrpcChannel validates the Windows version is WinServer2022 or later. Win11 version number is greater than WinServer2022. + // Note that this doesn't block using unsupported client and bidi streaming methods on WinServer2022. const int WinServer2022BuildVersion = 20348; if (HttpHandlerType == HttpHandlerType.WinHttpHandler && OperatingSystem.IsWindows &&