HttpClientHandler.MaxConnectionsPerServer Property

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets or sets the maximum number of concurrent connections (per server endpoint) allowed when making requests using an HttpClient object. Note that the limit is per server endpoint, so for example a value of 256 would permit 256 concurrent connections to http://www.adatum.com/ and another 256 to http://www.adventure-works.com/.

C#
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public int MaxConnectionsPerServer { get; set; }
C#
public int MaxConnectionsPerServer { get; set; }

Property Value

The maximum number of concurrent connections (per server endpoint) allowed by an HttpClient object.

Attributes

Remarks

The default value for this property is int.MaxValue.

Applies to

产品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.3, 1.4, 1.6, 2.0, 2.1