SPSite.Rename 方法

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

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Sub Rename ( _
    newUri As Uri _
)
用法
Dim instance As SPSite
Dim newUri As Uri

instance.Rename(newUri)
public void Rename(
    Uri newUri
)

参数

  • newUri
    类型:System.Uri

    A System.Uri object that represents the new URL.

异常

异常 条件
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.

另请参阅

引用

SPSite 类

SPSite 成员

Microsoft.SharePoint 命名空间