Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is this service returning a MaxItemsInObjectGraph exception?
    primarykey
    data
    text
    <p>The error being returned is that the 65K limit has been reached. Where is this coming from? I know it's the default but EVERYWHERE has been set to a higher value.</p> <p>I have already done the obvious - there are service and endpoint behaviours with large values for the dataContractSerializer property. These have also been associated with the endpoints and services.</p> <p>I don't believe the error is on the client as the config there is much simpler, but since people either aren't reading this text or don't believe, I will post the client below as well.</p> <p>Here is the config (server):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="basicHttpBindingWithWindowsAuth"&gt; &lt;readerQuotas maxDepth="32000000" maxStringContentLength="81920000" maxArrayLength="163840000" maxBytesPerRead="4096000" maxNameTableCharCount="16384000" /&gt; &lt;security mode="TransportCredentialOnly"&gt; &lt;transport clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;netTcpBinding&gt; &lt;binding name="DefaultServiceGroupBinding" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="81920000" maxConnections="10" maxReceivedMessageSize="81920000"&gt; &lt;readerQuotas maxDepth="32000000" maxStringContentLength="81920000" maxArrayLength="163840000" maxBytesPerRead="4096000" maxNameTableCharCount="16384000" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Transport"&gt; &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /&gt; &lt;message clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;wsHttpBinding&gt; &lt;binding name="wsHttpBindingWithWindowsAuth"&gt; &lt;readerQuotas maxDepth="32000000" maxStringContentLength="81920000" maxArrayLength="163840000" maxBytesPerRead="4096000" maxNameTableCharCount="16384000" /&gt; &lt;security mode="TransportWithMessageCredential"&gt; &lt;transport clientCredentialType="Windows"&gt; &lt;extendedProtectionPolicy policyEnforcement="Always" protectionScenario="TransportSelected" /&gt; &lt;/transport&gt; &lt;message clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;binding name="wsHttpBindingWithAnonymous"&gt; &lt;readerQuotas maxDepth="32000000" maxStringContentLength="81920000" maxArrayLength="163840000" maxBytesPerRead="4096000" maxNameTableCharCount="16384000" /&gt; &lt;security mode="None"&gt; &lt;transport clientCredentialType="None" /&gt; &lt;message clientCredentialType="None" negotiateServiceCredential="false" establishSecurityContext="false" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service behaviorConfiguration="routingData" name="System.ServiceModel.Routing.RoutingService"&gt; &lt;endpoint address="" behaviorConfiguration="routingEndPointBehavior" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingWithAnonymous" name="reqReplyEndpoint" contract="System.ServiceModel.Routing.IRequestReplyRouter" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="clientEndpointBehavior"&gt; &lt;dataContractSerializer maxItemsInObjectGraph="65000000" /&gt; &lt;clientEndpointBehavior /&gt; &lt;/behavior&gt; &lt;behavior name="routingEndPointBehavior"&gt; &lt;dataContractSerializer maxItemsInObjectGraph="655360000" /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="routingData"&gt; &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;dataContractSerializer maxItemsInObjectGraph="65536000" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;extensions&gt; &lt;behaviorExtensions&gt; &lt;add name="clientEndpointBehavior" type="Microsoft.Dynamics.Ax.Services.Host.ClientEndpointBehaviorExtension, Microsoft.Dynamics.IntegrationFramework.WebService.Process, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt; &lt;/behaviorExtensions&gt; &lt;/extensions&gt; &lt;!-- Define the client endpoints that we want the Router to communicate with. These are the destinations that the Router will send messages to. Note that we always define the client endpoint contract as *. The router will mirror the selected contract defied on the endpoint on which the message was originally recieved. --&gt; &lt;client&gt; &lt;endpoint address="net.tcp://SERVER:8201/DynamicsAx/Services/MyProjectPort" behaviorConfiguration="clientEndpointBehavior" binding="netTcpBinding" bindingConfiguration="DefaultServiceGroupBinding" contract="*" name="MyProject" /&gt; &lt;/client&gt; &lt;routing&gt; &lt;!-- Define the filters that we want the router to use. In this example we define a MatchAll message filter, which will match all messages it sees. --&gt; &lt;filters&gt; &lt;filter name="MatchMyProject" filterType="Custom" customType="Microsoft.Dynamics.Ax.Services.Host.MatchAxServiceFilter, Microsoft.Dynamics.IntegrationFramework.WebService.Process" filterData="http://tempuri.org/MyProject" /&gt; &lt;/filters&gt; &lt;!-- Define the routing table that contains the matchAll filter defined in the filters section. --&gt; &lt;filterTables&gt; &lt;filterTable name="AosRoutingTable"&gt; &lt;!-- Map the filter to a client endpoint that was previously defined. Messages that match this filter will be sent to this destination. --&gt; &lt;add filterName="MatchMyProject" endpointName="MyProject" /&gt; &lt;/filterTable&gt; &lt;/filterTables&gt; &lt;/routing&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre> <p>and here is the config (client):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;netTcpBinding&gt; &lt;binding name="NetTcpBinding_MyProject" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="6553600" maxConnections="10" maxReceivedMessageSize="65536"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Transport"&gt; &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" /&gt; &lt;message clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;wsHttpBinding&gt; &lt;binding name="reqReplyEndpoint" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="6553600" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="None"&gt; &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /&gt; &lt;message clientCredentialType="Windows" negotiateServiceCredential="true" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;binding name="WSHttpBinding_MyProject" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="6553600" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="None"&gt; &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /&gt; &lt;message clientCredentialType="Windows" negotiateServiceCredential="true" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="http://server.company.local:90/MicrosoftDynamicsAXAif60/MyProjectPort/xppservice.svc" behaviorConfiguration="endpointBEHAVE" binding="wsHttpBinding" bindingConfiguration="reqReplyEndpoint" contract="AppCATQAServiceReference.IRequestReplyRouter" name="reqReplyEndpoint" /&gt; &lt;endpoint address="http://server.company.local:90/MicrosoftDynamicsAXAif60/MyProjectPort/xppservice.svc" behaviorConfiguration="endpointBEHAVE" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_AppCAT" contract="AppCATQAServiceReference.AppCAT" name="WSHttpBinding_AppCAT" /&gt; &lt;endpoint address="net.tcp://mycomp:8201/DynamicsAx/Services/MyProjectPortPort" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_MyProjectPort" contract="MyProjectPortLocalServiceReference.MyProjectPort" name="NetTcpBinding_MyProjectPort"&gt; &lt;identity&gt; &lt;userPrincipalName value="me@company.com.au" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="endpointBEHAVE"&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483647"/&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload