Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF Maximum Read Depth Exception
    text
    copied!<p>I get the following exception when trying to pass a DTO over WCF services.</p> <pre><code>System.Xml.XmlException: The maximum read depth (32) has been exceeded because XML data being read has more levels of nesting than is allowed by the quota. This quota may be increased by changing the MaxDepth property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 5230. at System.Xml.XmlExceptionHelper.ThrowXmlException </code></pre> <p>The app.config binding looks like this</p> <pre><code> &lt;binding name="WSHttpBinding_IProjectWcfService" 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="10240000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"&gt; &lt;readerQuotas maxDepth="200" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Message"&gt; &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm=""&gt; &lt;extendedProtectionPolicy policyEnforcement="Never" /&gt; &lt;/transport&gt; &lt;message clientCredentialType="UserName" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" /&gt; &lt;/security&gt; &lt;/binding&gt; </code></pre> <p>Web.config service behaviour:</p> <pre><code> &lt;behavior name="BehaviorConfiguration" &gt; &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt; &lt;dataContractSerializer maxItemsInObjectGraph="6553600" /&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="SqlRoleProvider" /&gt; &lt;serviceCredentials&gt; &lt;serviceCertificate findValue="localhost" x509FindType="FindBySubjectName" storeLocation="LocalMachine" storeName="My" /&gt; &lt;userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="SqlMembershipProvider"/&gt; &lt;/serviceCredentials&gt; &lt;/behavior&gt; </code></pre> <p>And the DTO looks like this:</p> <pre><code>[Serializable] [DataContract(IsReference=true)] public class MyDto { </code></pre> <p>Any help would be appreciated as I am pulling my hair out with it.</p>
 

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