Export (0) Print
Expand All

SPSite.Rename method

Changes the URL of a host-header-named site collection to a new URL.

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

public void Rename(
	Uri newUri
)

Parameters

newUri
Type: System.Uri

A System.Uri object that represents the new URL.

ExceptionCondition
ArgumentNullException

newUri is null .

You cannot use the Rename method to convert a host-header-named site collection to a path-based site collection or vice versa.

The new URL must be reachable in the web application and must not already be used as an alternate access-mapping URL.

Show:
© 2014 Microsoft