0
我有一個具有這些配置設置的WCF服務。當我從客戶端應用程序調用它時,我仍然遇到了可怕的問題,「在對象圖中可以序列化或反序列化的項目的最大數目是'65536'」「我的配置下面出現了什麼問題?WCF maxReceivedMessageSize不工作
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="LargeBuffer" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647">
<readerQuotas maxDepth="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="ServiceBehavior" name="TestWcfService.Service1">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="LargeBuffer" name="ServiceEndPoint"
contract="TestWcfService.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
你增加了maxItemsInObjectGraph配額超出雙方的發送(序列化)和接收(反序列化)邊它的默認值?它適用於讀取和寫入數據。 – 2010-08-05 02:58:11
相同的配置是否也適用於您的客戶?你只顯示服務器端的配置 - 雙方都需要有新的設置才能工作。 – 2010-08-05 05:06:37
我是否必須基本上覆制配置文件之間的所有內容,然後Myles? – DevDave 2013-05-24 16:53:53