Share via


TopologyManager Constructor

NOTE: This API is now obsolete.

Note   The PortalUrl constructor throws an InvalidOperationException when you try to create a portal URL with a URL name that already exists. To avoid this issue, use a try/catch block around any PortalUrl constructors.

Namespace:  Microsoft.SharePoint.Portal.Topology
Assembly:  Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Syntax

'Declaration
<ObsoleteAttribute> _
Public Sub New
'Usage

Dim instance As New TopologyManager()
[ObsoleteAttribute]
public TopologyManager()

Remarks

Sample of code that will be broken by this change:

    TopologyManager tm = new TopologyManager();
    url1 = new PortalUrl("http://widgets.microsoft.com", new Uri(“http://exampleURL”));
    tm.PortalUrls.Add(url1);
    url2 = new PortalUrl("http://widgets.microsoft.com", new Uri(“http:// exampleURL”)); //This throws System.InvalidOperationException

To work around this issue

Use a try/catch block around any PortalUrl constructors.

See Also

Reference

TopologyManager Class

TopologyManager Members

TopologyManager Overload

Microsoft.SharePoint.Portal.Topology Namespace