Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ServicePointManager.DefaultPersistentConnectionLimit Field

Definition

Namespace:
System.Net
Assemblies:
netstandard.dll, System.Net.Requests.dll
Assemblies:
netstandard.dll, System.Net.ServicePoint.dll
Assembly:
System.Net.ServicePoint.dll
Assembly:
System.dll
Assembly:
netstandard.dll
Source:
ServicePointManager.cs
Source:
ServicePointManager.cs
Source:
ServicePointManager.cs
Source:
ServicePointManager.cs
Source:
ServicePointManager.cs

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.

The default number of persistent connections (2) allowed on a ServicePoint object connected to an HTTP/1.1 or later server. This field is constant and is used to initialize the DefaultConnectionLimit property if the value of the DefaultConnectionLimit property has not been set either directly or through configuration.

public: int DefaultPersistentConnectionLimit = 2;
public const int DefaultPersistentConnectionLimit = 2;
val mutable DefaultPersistentConnectionLimit : int
Public Const DefaultPersistentConnectionLimit As Integer = 2

Field Value

Value = 2

Examples

The following code example sets the DefaultConnectionLimit property using this field.

ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
 ServicePointManager.DefaultPersistentConnectionLimit

Applies to


Feedback

Was this page helpful?