共用方式為


SPDeletedSite.Restore Method

Restores the deleted site.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub Restore
'Usage
Dim instance As SPDeletedSite

instance.Restore()
public void Restore()

Exceptions

Exception Condition
FileNotFoundException

There is no content database for the deleted site.

-or-

The deleted site is gone.

NotSupportedException

Neither the content database nor the configuration database supports restoring the site.

SPException

The restored site already exists.

SecurityException

The current user is not the farm administrator.

Remarks

This method restores this deleted site from the deleted site table.

See Also

Reference

SPDeletedSite Class

SPDeletedSite Members

Microsoft.SharePoint.Administration Namespace