SPSite.ReadLocked Property

This member is reserved for internal use and is not intended to be used directly from your code. Use the SPSiteAdministration.ReadLocked property of the SPSiteAdministration class instead. Sets, and in some cases gets, a Boolean value that specifies whether the site collection is locked and unavailable for Read access.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public bool ReadLocked { get; set; }

Property Value

Type: System.Boolean
false if the site collection is not locked for Read access; if the site collection is locked, an exception is thrown by the get accessor.

Caution noteCaution

When the site collection is locked, a reference to this property does not return true. Instead, the call throws an exception. We recommend that you use the SPSiteAdministration.ReadLocked instead.

Getting the value of this property requires site collection administrator rights, while setting the value requires global administrator rights.