Catch (QuotaExceededException ex) and get something useful?

The only message he returns to me:

{"The size necessary to buffer the XML content exceeded the buffer quota."}
System.ServiceModel.QuotaExceededException

Do I need more space in my transport? How to increase either maxBufferPoolSize or maxReceiveMessageSize?

<httpTransport manualAddressing="false" maxBufferPoolSize="500000"
  maxReceivedMessageSize="500000" allowCookies="false" 
  authenticationScheme="Anonymous" bypassProxyOnLocal="false" 
  hostNameComparisonMode="StrongWildcard" keepAliveEnabled="true" 
  maxBufferSize="500000" proxyAuthenticationScheme="Anonymous"
  realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
  useDefaultWebProxy="true" />

TIA.

+3
source share
1 answer

And - I see you've increased the value of the <udapa> There is also maxBufferPoolSize, and maxReceiveMessageSizewhich should be increased, and then there's the whole set <ReaderQuotas>, which is also sometimes come into play (as a sub-band <httpBinding>).

<wsHttpBinding .......>
    <readerQuotas
            maxDepth="32"
            maxStringContentLength="8192"
            maxArrayLength="16384"
            maxBytesPerRead="4096"
            maxNameTableCharCount="16384"/>
</wsHttpBinding>

These are the default values ​​- first try increasing maxArrayLength and maxStringContentLength.

Also, do not forget to set these new values ​​both on the client side and on the server side!

Mark

+3

Source: https://habr.com/ru/post/1716501/


All Articles