Category Archives: SharePoint

All things with a SharePoint theme.

SharePoint STSADM command line error

Something that has bitten me a couple of times. If you are trying to copy an STSADM command line from a web page and paste it directly to the command prompt box on a SharePoint server. Don’t.

It doesn’t work because of something to do with pasting HTML style text into a DOS text prompt.

Re-type the command line or paste to a text editor as unformatted text and remove any formatting before copying and pasting from the text editor to the command line.

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.