System.Net.ServicePointManager.MaxServicePoints Property

Gets or sets the maximum number of System.Net.ServicePoint objects to maintain at any time.

Value: 0

Syntax

public static int MaxServicePoints { get; set; }

Value

A int containing the maximum number of System.Net.ServicePoint instances to maintain.

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe value specified for a set operation is less than zero or greater than int.MaxValue

Remarks

When you reduce the ServicePointManager.MaxServicePoints property below the number of System.Net.ServicePoint objects currently in existence, the System.Net.ServicePointManager deletes the System.Net.ServicePoint objects with the longest idle times. If the number of System.Net.ServicePoint objects with active connections is greater than the value of ServicePointManager.MaxServicePoints, the System.Net.ServicePointManager object deletes the System.Net.ServicePoint objects as they become idle.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0