PortalUrl Constructor

Include Protected Members
Include Inherited Members

NOTE: This API is now obsolete.

Obsolete.

Overload List

  Name Description
Public method PortalUrl(String, Uri) Obsolete. Obsolete.
Protected method PortalUrl(Guid, String, Uri) Obsolete. Obsolete.

Top

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.

See Also

Reference

PortalUrl Class

PortalUrl Members

Microsoft.SharePoint.Portal.Topology Namespace