Run-time configuration options for networking

HTTP/2 protocol

  • Configures whether support for the HTTP/2 protocol is enabled.
  • Default: Disabled (false).
  • Introduced in .NET Core 3.0.
Setting name Values
runtimeconfig.json System.Net.Http.SocketsHttpHandler.Http2Support false - disabled
true - enabled
Environment variable DOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_HTTP2SUPPORT 0 - disabled
1 - enabled

Sockets HTTP handler

Setting name Values
runtimeconfig.json System.Net.Http.UseSocketsHttpHandler true - enables the use of SocketsHttpHandler
false - enables the use of HttpClientHandler
Environment variable DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER 1 - enables the use of SocketsHttpHandler
0 - enables the use of HttpClientHandler