SharePoint error: Value does not fall within the expected range. at Microsoft.SharePoint.SPFolderCollection.get_Item

In a day plagued with SharePoint errors, this one was a minor issue.

Value does not fall within the expected range.   at Microsoft.SharePoint.SPFolderCollection.get_Item(String urlOfFolder)
at Microsoft.SharePoint.Publishing.CommonUtilities.GetDocLibByUrl(SPWeb web, String webRelativeUrl)

This arose because the site that I was trying to Activate SharePoint Publishing service was within a Site Collection that had the service disabled. Enabling at the collection level, then allowed enabling at the site level.

Leave a Reply

Your email address will not be published. Required fields are marked *