-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,6 +184,18 @@ internal GrpcChannel(Uri address, GrpcChannelOptions channelOptions) : base(addr | |
{ | ||
Log.AddressPathUnused(Logger, Address.OriginalString); | ||
} | ||
|
||
// Validate the Windows version can support WinHttpHandler. | ||
const int WinServer2022BuildVersion = 20348; | ||
if (HttpHandlerType == HttpHandlerType.WinHttpHandler && | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
JamesNK
Author
Member
|
||
OperatingSystem.IsWindows && | ||
OperatingSystem.OSVersion.Build < WinServer2022BuildVersion) | ||
{ | ||
throw new InvalidOperationException("The channel configuration isn't valid on this operating system. " + | ||
"The channel is configured to use WinHttpHandler and the current version of Windows " + | ||
"doesn't support HTTP/2 features required by gRPC. Windows Server 2022 or Windows 11 or later is required. " + | ||
"For more information, see https://aka.ms/aspnet/grpc/netframework."); | ||
} | ||
} | ||
|
||
private void ResolveCredentials(GrpcChannelOptions channelOptions, out bool isSecure, out List<CallCredentials>? callCredentials) | ||
|
This commit blocks .NET 6 apps on Windows 2019. It is supposed to allow it on .NET >= 6.0