c# - Issue with maxStringContentLength on WCF -


i have inherited wcf web service running asp.net 2 on iis 7.

however, have problem when posting large amounts of data, produces error 400 bad request.

i've added element, trace producing following error

"there error deserializing object of type cix.api.contracts.postmessage. maximum string content length quota (8192) has been exceeded while reading xml data. quota may increased changing maxstringcontentlength property on xmldictionaryreaderquotas object used when creating xml reader. line 51, position 322."

i've included whole system.servicemodel below - can spot that's amiss? i've been trying fix time, i've been unable , appreciated.

<diagnostics>     <messagelogging logmessagesattransportlevel="true" logmessagesatservicelevel="false" logmalformedmessages="true" logentiremessage="true" maxsizeofmessagetolog="65535000" maxmessagestolog="500" /> </diagnostics> <extensions>   <behaviorextensions>     <add name="resthttpbehavior" type="cix.api.behaviors.errorhandling.restbehaviorextension, cix.api, version=2.0.0.0, culture=neutral, publickeytoken=null" />   </behaviorextensions>   <bindingelementextensions>     <add name="securecixchannel" type="cix.api.channels.securecix.securecixbindingextension, cix.api, version=2.0.0.0, culture=neutral" />     <add name="hlrestchannel" type="cix.api.channels.hlrest.hlbindingextension, cix.api" />   </bindingelementextensions> </extensions> <services>   <service behaviorconfiguration="cix.api.servicebehavior" name="cix.api.cix">     <host>       <baseaddresses>         <add baseaddress="http://localhost/api/" />       </baseaddresses>     </host>     <endpoint contract="cix.api.icix" address="" binding="custombinding" bindingconfiguration="cixbinding" behaviorconfiguration="cix.api.cixbehavior" />   </service> </services> <bindings>   <custombinding>     <binding name="cixbinding" maxbuffersize="2147483647" maxreceivedmessagesize="2147483647" maxbufferpoolsize="2147483647">       <securecixchannel />       <webmessageencoding>         <readerquotas maxstringcontentlength="2147483647" />       </webmessageencoding>              <httptransport manualaddressing="true" maxreceivedmessagesize="2147483647" maxbuffersize="2147483647" />     </binding>     </custombinding> </bindings> <behaviors>   <endpointbehaviors>     <behavior name="cix.api.cixbehavior">       <datacontractserializer maxitemsinobjectgraph="200000" />       <!--<webhttp />-->       <resthttpbehavior />     </behavior>   </endpointbehaviors>   <servicebehaviors>     <behavior name="cix.api.servicebehavior">       <servicemetadata httpgetenabled="true" />       <servicedebug includeexceptiondetailinfaults="true" />     </behavior>     <behavior name="cix.web.cixbehavior">       <servicemetadata httpgetenabled="true" />       <servicedebug includeexceptiondetailinfaults="false" />     </behavior>   </servicebehaviors> </behaviors> 

leslie

also try adding maxarraylength="2147483647" maxbytesperread="2147483647" readerquota.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -