Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF config files - and the famous "string content length quota (8192)" error
    primarykey
    data
    text
    <p>Folks,</p> <p>Thanks for your help with my previous WCF config file issue. Here's a new one.</p> <p>My project is a WinForms app client (.NET 4.0) that pulls data from (and saves it to) a WCF services hosted on IIS 7.0. When I save a small payload, all is well. When I try to save a payload over 8192 bytes the error is:</p> <blockquote> <p>The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter <a href="http://tempuri.org/:objEncounterType" rel="noreferrer">http://tempuri.org/:objEncounterType</a>. The InnerException message was 'There was an error deserializing the object of type PsychCoverage.Common.EncounterType. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 10809.'. Please see InnerException for more details</p> </blockquote> <p>I have confirmed that my <code>&lt;binding name=""&gt;</code> is the same as my <code>&lt;endpoint bindingConfiguration=""&gt;</code>. </p> <p>I've set my <code>maxReceivedMessageSize</code> and <code>maxBufferPoolSize</code> and <code>maxBufferSize</code> all to 10,000,000 on both my client <code>app.config</code> and my <code>web.config</code>. I tried making my <code>&lt;readerQuota&gt;</code> values very high. </p> <p>In my web.config I set <code>&lt;httpRuntime maxRequestLength="10000000" /&gt;</code></p> <p>This is from my client <code>app.config</code>:</p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="wcfAdmin_binding" maxReceivedMessageSize="10000000" maxBufferPoolSize="10000000" maxBufferSize="10000000" messageEncoding="Text" sendTimeout="00:05:00" receiveTimeout="00:05:00" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false" &gt; &lt;readerQuotas maxDepth="200" maxStringContentLength="10000000" maxArrayLength="16384" maxBytesPerRead="10000000" maxNameTableCharCount="16384" /&gt; &lt;security mode="None"&gt;&lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;clear/&gt; &lt;endpoint address="http://localhost/PsychCoverage/Admin.svc" name="AdminUIClientEndpoint" binding="basicHttpBinding" bindingConfiguration="wcfAdmin_binding" contract="PsychCoverage.Common.IAdmin"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; </code></pre> <p>And this is from my service <code>web.config</code>:</p> <pre><code>&lt;system.serviceModel&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="False" &gt;&lt;/serviceHostingEnvironment&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="wcfAdmin_binding" maxReceivedMessageSize="10000000" maxBufferPoolSize="10000000" maxBufferSize="10000000" messageEncoding="Text" sendTimeout="00:05:00" receiveTimeout="00:05:00"&gt; &lt;readerQuotas maxDepth="200" maxStringContentLength="10000000" maxArrayLength="16384" maxBytesPerRead="10000000" maxNameTableCharCount="16384" /&gt; &lt;security mode="None"&gt;&lt;/security&gt; &lt;/binding&gt; &lt;binding name="wcfClientWebPortal_binding" maxReceivedMessageSize="10000000" maxBufferPoolSize="10000000" maxBufferSize="10000000" messageEncoding="Text" sendTimeout="00:05:00" receiveTimeout="00:05:00"&gt; &lt;readerQuotas maxDepth="200" maxStringContentLength="10000000" maxArrayLength="16384" maxBytesPerRead="10000000" maxNameTableCharCount="16384" /&gt; &lt;security mode="None"&gt;&lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service behaviorConfiguration="wcfBehavior" name="PsychCoverage.WcfMT.Admin"&gt; &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="wcfAdmin_binding" name="AdminEndpoint" bindingName="wcfAdmin_binding" contract="PsychCoverage.Common.IAdmin"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/service&gt; &lt;service behaviorConfiguration="wcfBehavior" name="PsychCoverage.WcfMT.ClientWebPortal"&gt; &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="wcfClientWebPortal_binding" name="ClientWebPortalEndpoint" bindingName="wcfClientWebPortal_binding" contract="PsychCoverage.Common.IClientWebPortal"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="wcfBehavior"&gt; &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt; &lt;serviceMetadata httpGetEnabled="False" /&gt; &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100" maxConcurrentInstances="100" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; </code></pre> <p>Many thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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