PortalUrl Class
NOTE: This API is now obsolete.
Use classes in the Microsoft.SharePoint.Administration namespace in Windows SharePoint Services 3.0 instead.
Inheritance Hierarchy
System.Object
Microsoft.SharePoint.Portal.Topology.TopologyObjectBase
Microsoft.SharePoint.Portal.Topology.PortalUrl
Namespace: Microsoft.SharePoint.Portal.Topology
Assembly: Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)
Syntax
'Declaration
<ObsoleteAttribute> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class PortalUrl _
Inherits TopologyObjectBase
'Usage
Dim instance As PortalUrl
[ObsoleteAttribute]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class PortalUrl : TopologyObjectBase
Remarks
The PortalUrl constructor throws an InvalidOperationException exception when you try to create a portal URL with an existing URL name. The workaround is to use a try/catch block around any PortalUrl constructors.
Sample of code that this change will break:
TopologyManager tm = new TopologyManager();
url1 = new PortalUrl("http://widgets.microsoft.com", new Uri(“https://https://widgets.microsoft.com”));
tm.PortalUrls.Add(url1);
url2 = new PortalUrl("http://widgets.microsoft.com", new Uri("https://https://widgets.microsoft.com")); //This throws System.InvalidOperationException
Workaround
Use a try/catch block around any PortalUrl constructors.
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.