Search code examples
wcftridiontridion-2011

Getting 'MaxItemsInObjectGraph quota' error while trying to filter the process histories


I am trying to loop through all the items under Workflow Management --> Process Histories and do something.

The below is my code:

ProcessesFilterData filter = new ProcessesFilterData()
{
    BaseColumns = ListBaseColumns.IdAndTitle,
    ProcessType = ProcessType.Historical
};
foreach (IdentifiableObjectData data in csClient.GetSystemWideList(filter))
{
     //doing somethine here
}

I am getting the below error in the line foreach (IdentifiableObjectData data in csClient.GetSystemWideList(filter))

Error Message:

The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://www.sdltridion.com/ContentManager/CoreService/2011:GetSystemWideListResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota. '. Please see InnerException for more details.


Solution

  • Check out http://www.dailycode.info/Blog/post/2011/05/27/Change-the-object-graph-or-increase-the-MaxItemsInObjectGraph-quota.aspx. You can change the value in the Web.config in %TRIDION_HOME%\webservices. My installation alreaady has a value significantly higher than indicated by your error.