Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ServicePointManager.DefaultPersistentConnectionLimit Field

The default number of persistent connections (2) allowed on a ServicePoint connected to an HTTP/1.1 or later server. This field is constant.

[Visual Basic]
Public Const DefaultPersistentConnectionLimit As Integer
[C#]
public const int DefaultPersistentConnectionLimit;
[C++]
public: const int DefaultPersistentConnectionLimit;
[JScript]
public var DefaultPersistentConnectionLimit : int;

Example

[Visual Basic, C#, C++] The following example sets the System.Net.DefaultConnectionLimit property using this field.

[Visual Basic] 
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit

[C#] 
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;

[C++] 
ServicePointManager::UseNagleAlgorithm = true;
ServicePointManager::Expect100Continue = true;
ServicePointManager::CheckCertificateRevocationList = true;
ServicePointManager::DefaultConnectionLimit = ServicePointManager::DefaultPersistentConnectionLimit;

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

ServicePointManager Class | ServicePointManager Members | System.Net Namespace

Show:
© 2015 Microsoft