WCF hizmetleri üzerinden bir DTO iletmeye çalışırken aşağıdaki özel durumları alıyorum. BuWCF Maksimum Okuma Derinliği İstisnası
<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">
<readerQuotas maxDepth="200" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="">
<extendedProtectionPolicy policyEnforcement="Never" />
</transport>
<message clientCredentialType="UserName" negotiateServiceCredential="true"
algorithmSuite="Default" establishSecurityContext="true" />
</security>
</binding>
Web.config hizmet davranışı gibi
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
app.config bağlama görünüyor:
Ve DTO şuna benzer:
[Serializable]
[DataContract(IsReference=true)]
public class MyDto
{
Herhangi yardım, ben olduğum için takdir edilecektir saçlarımı çekiyorum. Sen istemci ve maç için sunucu üzerinde bağlayıcı yapılandırmasını değiştirmek zorunda
istemci hem de sunucu yapılandırmasını değiştirdiniz:
sunucu tarafı da kendi wsHttpBinding yapılandırmasında bu satırları içerdiğinden emin olun? Bu değişimi her ikisinde de eşleştirmem gerektiği izlenimim var. –Bu kadar derinlemesine yuva yapmak oldukça sıradışı. Dairesel referansınız olabilir. Bu DTO'nun daha fazlasını görmemiz gerektiğini düşünüyorum; Maksimum yuvalamayı değiştirmek sadece bir bant yardımcısı çözümü olabilir. – Aaronaught
Burada açıkladığım gibi sorunumu çözdüm: http://stackoverflow.com/questions/5537794/error-while-deserializing-the-object-in-wcf – Adi