ServicePointManager.MaxServicePoints Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Net
Assembly:  System (in System.dll)

static member MaxServicePoints : int with get, set

Property Value

Type: System.Int32

The maximum number of ServicePoint objects to maintain. The default value is 0, which means there is no limit to the number of ServicePoint objects.

Exception Condition
ArgumentOutOfRangeException

MaxServicePoints is less than 0 or greater than Int32.MaxValue.

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

The following code example sets this property.

No code example is currently available or this language may not be supported.

WebPermission

for unrestricted Web permissions. Associated enumeration: Unrestricted

.NET Framework
Available since 1.1
Return to top
Show: