How to resolve the error 'MaxItemsInObjectGraph quota' in Portrait Dialogue

Products Affected: Portrait Dialogue
If you see the following error in Portrait Dialogue (PD):

   Maximum number of items that can be serialized or deserialized in an object graph is '65536'.

There are some steps that you can take to resolve this.
Usually, you only need to apply one set of changes to one of the configuration files, but if it still happens, then you should also add the fix to a second configuration file (see below).
  • Log out of the Portrait Dialogue application.
  • On your PD server, navigate to C:\Program Files (x86)\PST\Million Handshakes\Dialog Server\DialogServerPlugins\Cms
  • Locate the file called CmsPlugin.dll.config and make a local back-up of it in case anything goes wrong.
  • Open the file in a text editor and locate the line near the top that starts with:
  • Check to see whether there is already any existing tag beneath this called <behaviors>. If so, please check if it is identical to this and then continue to check the client endpoint details below.
  • Assuming that there is NOT, copy the following block of XML directly under the above <system.serviceModel> tag.
    <behavior name="pointBehavior" >
      <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
  • Near the bottom of the file, locate the section that starts with the tag <client>
  • There should be three (or four) <endpoint> entries under this.
  • For the two (or three) endpoint tags that do NOT mention ISessionService, add the following attribute text before the endpoint’s closure
  • Save the file.
  • Restart COM+, IIS, and recycle the application pools used.
  • Try to reproduce the issue that you were seeing previously.
If the issue still persists, you should replicate the same steps above within the web.config file for the MhWebPortal web application. The easiest way to locate this file is to open IIS and then right-click the MhWebPortal application and select Explore.

UPDATED:  April 19, 2017