1

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.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Jey
  • 2,137
  • 4
  • 22
  • 40
  • Change the maximum size for it. Use google to find out how, this is a WCF configuration issue, nothing to do with Tridion. – Nuno Linhares Oct 17 '12 at 10:39
  • Not the same issue, but worth a look: http://stackoverflow.com/questions/9983114/how-should-i-decide-the-quotas-for-the-tridion-core-service-binding – Dominic Cronin Oct 18 '12 at 07:02
  • http://stackoverflow.com/questions/7476853/wcf-error-maximum-number-of-items-that-can-be-serialized-or-deserialized-in-an – Uğur Gümüşhan Jan 30 '13 at 07:40

1 Answers1

9

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.

Jeremy Grand-Scrutton
  • 2,802
  • 14
  • 20
  • Hi Jeremy, when i checked my config file, it doesnt have endpointbehaviour node. it has only service behaviours node and its maxItemsInObjectGraph="2147483647" is already set – Jey Oct 18 '12 at 06:23
  • Then I guess you need to find the web.config for your client and add/update the endpointbehaviour node value. How are you creating your CoreServe client? – Jeremy Grand-Scrutton Oct 18 '12 at 07:57
  • var netTcpBinding = new NetTcpBinding { MaxReceivedMessageSize = 2147483647, ReaderQuotas = new XmlDictionaryReaderQuotas { MaxStringContentLength = 2147483647, MaxArrayLength = 2147483647 } }; I am using the above line when i create client – Jey Oct 18 '12 at 08:22
  • Look for the section called "Serialization behaviours" at http://msdn.microsoft.com/en-us/library/ms732038.aspx – Jeremy Grand-Scrutton Oct 18 '12 at 08:41
  • Incidentally, I found all of this information in a matter of minutes using Google and some, or all, of your error message as my search term... – Jeremy Grand-Scrutton Oct 18 '12 at 08:43