We have a SharePoint 2010 site which appears "nuked" after all permisisons were accidentally removed:
- Accessing the site as a normal user or a Site/Farm administrator results in a: 500 INTERNAL SERVER ERROR
- Accessing the _layouts/settings.aspx page results in a: 403 FORBIDDEN.
- Accessing the site with powershell yields:
PS C:\> $web = Get-SPWeb "http://url/site/ subsite"
Get-SPWeb : Cannot find an SPWeb object with Id or Url : http://url/site/subsite and site Url http://url .
At line:1 char:17
+ $web = Get-SPWeb <<<< "http://url/site/subsite"
+ CategoryInfo :InvalidData : (Microsoft.Share....SPCmdletGetWeb:SPCmdletGetWeb) [Get-SPWeb], SPCmdletPipeBindException - Accessing the parent Web site ($web.Webs[5]) shows the site and we can see it's Site Title ($web.Webs[5].Title), however any security-related operations fail (e.g. BreakRoleInheritance($true), Permissions.ResetPermissions, Roles Collection)... with
this error: The following exception was thrown when trying to enumerate the collection: "Cannot complete this action.
Please try again.".
At line:1 char:14
+ $web.Webs[5]. <<<< Roles
+ CategoryInfo : NotSpecified: (:) [], ExtendedTypeSystemException
+ FullyQualifiedErrorId : ExceptionInGetEnumerator - Accessing "PS C:\> $web.Webs[5].Webs" causes this error:
Cannot index into a null array. - This is all I can really find in the ULS logs:
11/22/2010 15:36:22.18 PowerShell.exe (0x128C) 0x0AC8 SharePoint Foundation General 8kh7 High Cannot complete this action. Please try again.<nativehr>0x80004005</nativehr><nativestack></nativestack> e484e439-f403-45d1-bf20-fd84437542e4
11/22/2010 15:36:22.18 PowerShell.exe (0x128C) 0x0AC8 SharePoint Foundation PowerShell 6tf2 High Cannot find an SPWeb object with Id or Url : http://url/site/subsite and site Url http://url. e484e439-f403-45d1-bf20-fd84437542e4
11/22/2010 15:36:22.18 PowerShell.exe (0x128C) 0x0AC8 SharePoint Foundation PowerShell 91ux High Error Category: InvalidData Target Object Microsoft.SharePoint.PowerShell.SPCmdletGetWeb Details NULL RecommendedAction NULL e484e439-f403-45d1-bf20-fd84437542e4
We have requested a content database restore (losing a day of content) as we can't wait for a fix.
But for future reference, is there any way to recover for this error?