System.Net.ServicePointManager.FindServicePoint Method

Finds an existing System.Net.ServicePoint object or creates a new System.Net.ServicePoint object to manage communications with the specified Uri object.

Syntax

public static ServicePoint FindServicePoint (Uri address)

Parameters

address
The Uri object of the Internet resource to contact.

Returns

The System.Net.ServicePoint object that manages communications for the request.

Exceptions

TypeReason
ArgumentNullException address is null.
InvalidOperationExceptionThe maximum number of service points defined in ServicePointManager.MaxServicePoints has been reached and there is no service point that connects to the specified host.

Remarks

The ServicePointManager.FindServicePoint(Uri) method returns the System.Net.ServicePoint object associated with the specified Internet host name. If no System.Net.ServicePoint object exists for that host, the System.Net.ServicePointManager object creates one.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0