,

Planning to run Lists.GetListItems() in SharePoint 2010?

Posted by

I recently had a customer that was using custom code against the OM in order to pull list items via the Lists.GetListItems() method. When attempting to run this method it was returning the following exception:


Microsoft.SharePoint.SoapServer.SoapServerException, No InnerExpection System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) customApp.Lists.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID) in E:\customApp\customApp\Web References\Lists\Reference.vb:test 403. CustomApp.Application.ImportObjects(ObjectBase& ob, String obj, String ouid, String otype, String site, String liid, String viid, String folder, String title, String usr, String pwd, String dom, String site2, String liid2, String modname, String semmodname, String lookupfield, Boolean bImportClass) in E:\\customapp\App.vb:1111.



 


This particular list had 10 lookup columns pointing to 10 different lists. This specific behavior is by design because we put a cap via “list throttle” settings at the web application level.


This can be accessed via Central Administrator\Application Management\Manage Web Applications\General Settings\Resource Throttling:


clip_image001


 


As noted above, the default value for default lookup fields is 8. Once this was increased to 10 or higher, the custom code returned the items successfully and no more soap exception. I just wanted to point this out as I think many developers will utilize Lists.GetListItems() and need to be aware of resource throttling..


Note: Other settings reside in Resource Throttling like “List View Threshold”, which defaults to 5,000 items.


See this blog for good information on that setting:


http://blogs.technet.com/speschka/archive/2009/10/27/working-with-large-lists-in-sharepoint-2010-list-throttling.aspx