Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ServicePointManager Class

Manages the collection of ServicePoint instances.

For a list of all members of this type, see ServicePointManager Members.

System.Object
   System.Net.ServicePointManager

[Visual Basic]
Public Class ServicePointManager
[C#]
public class ServicePointManager
[C++]
public __gc class ServicePointManager
[JScript]
public class ServicePointManager

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

ServicePointManager is a static class used to create, maintain, and delete instances of the ServicePoint class.

When an application requests a connection to an Internet resource URI through the ServicePointManager, the ServicePointManager returns a ServicePoint instance containing connection information for the host identified by the URI. If there is an existing ServicePoint for that host, the ServicePointManager returns the existing ServicePoint, otherwise the ServicePointManager creates a new ServicePoint instance.

Example

[Visual Basic, C#, C++] The following example creates a ServicePoint instance for connections to the URI www.contoso.com .

[Visual Basic] 
Dim myUri As New Uri("http://www.contoso.com/")
       
Dim mySP As ServicePoint = ServicePointManager.FindServicePoint(myUri)


[C#] 
Uri myUri = new Uri("http://www.contoso.com/");
 
 ServicePoint mySP = ServicePointManager.FindServicePoint(myUri);
   

[C++] 
Uri* myUri = new Uri(S"http://www.contoso.com/");
 
 ServicePoint* mySP = ServicePointManager::FindServicePoint(myUri);
   

[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

Namespace: System.Net

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

Assembly: System (in System.dll)

See Also

ServicePointManager Members | System.Net Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.