ServicePointManager.DefaultConnectionLimit 속성

정의

ServicePoint 개체에서 허용하는 최대 동시 연결 수를 가져오거나 설정합니다.

public:
 static property int DefaultConnectionLimit { int get(); void set(int value); };
public static int DefaultConnectionLimit { get; set; }
static member DefaultConnectionLimit : int with get, set
Public Shared Property DefaultConnectionLimit As Integer

속성 값

ServicePoint 개체에서 허용하는 최대 동시 연결 수입니다. 기본 연결 제한은 호스팅되는 ASP.NET 애플리케이션에 대 한 10과 다른 모든 사용자는 2입니다. 앱이 ASP.NET 호스트로 실행되고 있는 경우 자동 구성 속성이 true로 설정되면 구성 파일을 통해 이 속성의 값을 변경할 수 없습니다. 자동 구성 속성이 true이면 프로그래밍 방식으로 값을 변경할 수 있습니다. AppDomain이 로드되면 원하는 값을 한 번 설정합니다.

예외

DefaultConnectionLimit가 0보다 작거나 같은 경우

예제

다음 코드 예제에서는이 속성을 설정합니다.

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;
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit

설명

속성은 DefaultConnectionLimit 개체를 만들 ServicePoint 때 개체가 속성에 ServicePointManager 할당 ConnectionLimit 하는 기본 최대 동시 연결 수를 설정합니다.

DefaultConnectionLimit 속성을 변경해도 기존 ServicePoint 개체에는 영향을 주지 않으며 변경 후 초기화된 개체에만 ServicePoint 영향을 줍니다. 이 속성의 값이 직접 또는 구성을 통해 설정되지 않은 경우 기본값은 상수 DefaultPersistentConnectionLimit로 설정됩니다.

참고

속성을 변경하면 DefaultConnectionLimit HTTP 1.0 및 HTTP 1.1 연결 모두에 영향을 줍니다. HTTP 1.0 및 HTTP 1.1 프로토콜에 대한 연결 제한을 별도로 변경할 수 없습니다.

적용 대상

추가 정보