Share via


Changes in SharePoint Portal Server 2003 APIs in Office SharePoint Server 2007

This topic lists some of the changes in the Microsoft Office SharePoint Portal Server 2003 APIs. This topic is a work-in-progress and the list is not exhaustive.

Web Sites with Duplicate Titles Do Not Throw AreaDuplicationException Exceptions

Web sites with duplicate titles are allowed in Microsoft Office SharePoint Server 2007. SharePoint Portal Server 2003 did not allow duplicate titles. An AreaDuplicateException is therefore not thrown in Office SharePoint Server 2007.

Creating a Portal URL with the Name of an Existing URL Throws an InvalidOperationException Exception

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("exampleURL", new Uri(“http://exampleURL”));
    tm.PortalUrls.Add(url1);
    url2 = new PortalUrl("exampleURL", new Uri("http://exampleURL")); //This throws System.InvalidOperationException

Workaround

Use a try/catch block around any PortalUrl constructors.

Need to Call Area.Web.Close() Method for Console Applications Written Against the SharePoint Portal Server 2003 Object Model

You should call the Area.Web.Close() method in console applications that iterate through Web sites, or your application might run out of memory. This call is not needed for Web Parts and controls.

PortalSite.Url Now Throws NotSupportedException Exception

Url { set; } throws a NotSupportedException exception in Office SharePoint Server 2007.

AreaListing.Url, AreaListing.LargeIconURL and AreaListing.SmallIconURL Properties Always Return the Full URL

In Office SharePoint Server 2007, the following properties always return the full URL of the list item even if you specified a server-relative URL when setting these properties:

Changes in AreaListing.Status Values

In SharePoint Portal Server 2003, the Status property had four values:

  • Pending

  • Approved

  • Rejected

  • Archived

In Office SharePoint Server 2007, listings are based on Windows SharePoint Services 3.0 list items. List items do not support expiration and appearance dates and they do not have an equivalent moderation status for archived. In Office SharePoint Server 2007, you will see the following changes in the value of the AreaListing.Status property:

  • Expired listings have the Rejected status.

  • Yet to appear listings have the Pending status.

  • Archived listings have the Rejected status.