0
我發送數組到WCF服務,並且當數組超過約2400個項目時出現協議錯誤。我試圖通過修改服務的web.config文件來增加服務接受的大小,但是沒有取得任何成功。這裏是從web.config相關的代碼:發送到WCF服務的陣列的最大長度
<system.web>
<httpRuntime maxRequestLength="2097151" />
<compilation debug="true" targetFramework="4.5"/>
<pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>
<system.serviceModel>
<services>
<service name="prop84r4Service.ServiceProp84r4" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="prop84r4Service.IServiceProp84r4" behaviorConfiguration="web" bindingConfiguration="webHttpBindingDev">
</endpoint>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="webHttpBindingDev">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</webHttpBinding>
</bindings>
<behaviors>
任何想法我做錯了或沒有做?
感謝
可能maxItemsInObjectGraph。請參閱http://stackoverflow.com/questions/9191167/maximum-number-of-items-that-can-be-serialized-or-deserialized-in-an-object-grap – Brian
可能重複[WCF - 如何增加消息大小配額](http://stackoverflow.com/questions/884235/wcf-how-to-increase-message-size-quota) – MickyD
此鏈接maxrecievedmessagesize答案解決了這個問題 - 謝謝! – pvitt