My workaround was to edit MaxItemsInObjectGraph in machine.config
under system.serviceModel I added
<commonBehaviors>
<endpointBehaviors>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</endpointBehaviors>
<serviceBehaviors>
<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
</serviceBehaviors>
</commonBehaviors>
then I had another error regarding .NET, and I figured out it was about some buffer size, so I added to system.serviceModel in machine.config
<bindings>
<netTcpBinding>
<binding name="netTcpBinding" closeTimeout="00:10:00" openTimeout="00:10:00" sendTimeout="00:10:00" listenBacklog="100" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="100" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</netTcpBinding>
</bindings>
Anyway, your solution is way better, as editing machine.config is something I'd like to do only on my machine.
As a suggestion: would it be possible for the veristand .NET API to handle these exceptions, and eventually to give me the option to edit this parameters in the code, like I do in other languages?
Thanks,
Matteo