Server was unable to process request. ---> Value does not fall within the expected range. Error listing files in the folder

book

Article ID: 100031441

calendar_today

Updated On:

Description

Error Message

https://sharepoint.web.local/filefolder/files    *** Error ***    Server was unable to process request. ---> Value does not fall within the expected range. Error listing files in the folder

Cause

This issue is due to a custom field that has been created for a list/library and that custom field requires a value that does not exist.

This can be determined by setting verbose logging on the SharePoint server. 
Using the SharePoint Management Shell, the set-sploglevel cmdlet will set trace severity to verbose.
 
  Set-sploglevel -traceseverity verbose

The default location for the SharePoint diagnostic logging can be found in:
C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS

Within the SharePoint diagnostics log, you should be able to see:

Unable to get value for field [CustomField]    
 at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)    
 at Microsoft.SharePoint.SPListItem.get_Item(Guid fieldId)    
 at KVS.EnterpriseVault.SharePointWebService.EVCustomHelper.AddUserLoginNames(XmlDocument doc, XmlNode ndItemNode, SPListItem listItem)    
 at EVCustom.ListDocumentChanges(String inFolder, String inLibrary, String dateTime, String camlQuery, UInt32 rowLimit, String pagingInfo, Int32 largeMetadataSize)    
 at EVCustom.ListDocumentsInFolder(String inFolder, String inLibrary, UInt32 rowLimit, String pagingInfo, Int32 largeMetadataSize)     

Upon completion of troubleshooting, ensure you clear diagnostics logging by using the clear-sploglevel cmdlet.



Resolution

Either a value needs to be added using a SharePoint Management Shell script, or remove the custom field from SharePoint.

Issue/Introduction

The entries stating that the value does not fall within the expected range can be numerous causing SharePoint Archiving performance to be severely degraded.  Additionally, any contents within the folder will not be archived due to this issue.