Mono Class Library: System.Net.ServicePointManager Overview | Members

System.Net.ServicePointManager.FindServicePoint Method

Finds an existing System.Net.ServicePoint or creates a new System.Net.ServicePoint to connect to the specified host.

public static ServicePoint FindServicePoint (Uri address, IWebProxy proxy)

Parameters

address
A Uri instance containing the address of the Internet resource to contact.
proxy
A System.Net.IWebProxy that represents a proxy server to access.

Returns

A System.Net.ServicePoint that connects to the host identified in address .

Exceptions

TypeReason
ArgumentNullExceptionaddress 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

If no System.Net.ServicePoint exists for the Uri.Host specified in address , the System.Net.ServicePointManager attempts to create one.

Requirements

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