Skip to content

Commit

Permalink
Improve comment in GrpcChannel for WinHttpHandler + OS validation (#2237
Browse files Browse the repository at this point in the history
)
  • Loading branch information
JamesNK authored Aug 10, 2023
1 parent 89e6611 commit 870bf84
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Grpc.Net.Client/GrpcChannel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 870bf84

Please sign in to comment.