modify site collection as read only in sharepoint
Site Collection Read-Only in SharePoint
Option 1: Making Read-Only through Central AdministrationGo to
Central Administration > Application Management > Configure quotas and
locks
In the appearing page, choose the site
collection & select the option Read-only.
Option 2: Making Read-Only through
PowerShell
Set-SPSite -Identity
"http://hp/sites/sc2? -LockState "ReadOnly"
Set-SPSite -Identity
"http://hp/sites/sc2? -LockState "Unlock"
Option 3: Making Read-Only through
Code
SPSite
site = new SPSite("http://hp/sites/sc2?);
site.ReadOnly
= true;
Comments