Export (0) Print
Expand All

ServicePointManager.DefaultPersistentConnectionLimit Field

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.

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

'Declaration
Public Const DefaultPersistentConnectionLimit As Integer
'Usage
Dim value As Integer

value = ServicePointManager.DefaultPersistentConnectionLimit

public static final int DefaultPersistentConnectionLimit
public const var DefaultPersistentConnectionLimit : int
Not applicable.

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.set_UseNagleAlgorithm(true);
ServicePointManager.set_Expect100Continue(true);
ServicePointManager.set_CheckCertificateRevocationList(true);
ServicePointManager.set_DefaultConnectionLimit(
    ServicePointManager.DefaultPersistentConnectionLimit);

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft