views:

288

answers:

1

I'm getting this error message

"The Maximum string content length quota (8192) has been exceeded while reading XML data. This quotea may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader"

In the one of my orchestrations that consumes a wcf webservice (stacktrace indicates the receive shape is where the issue is), It is likely that the response is very large.

looking at some of the other questions with this error message the solution is to change a WCF bindings setting in the configuration file. However I can't find these configuration settings when I'm using biztalk. They don't seem to be generated anywhere, should I be trying to add them to BTSNTSVc.exe.config.

Any suggestions welcome.

+2  A: 

Do you have control over the server side code? If so, change the config there and regenerate the service reference. Should look something like maxStringContentLength="2147483647":

 <bindings>
  <wsHttpBinding>
    <binding name="newHTTPBinding" maxBufferPoolSize="2147483647"maxReceivedMessageSize="2147483647">
      <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
        maxArrayLength="16384" maxBytesPerRead="4096"maxNameTableCharCount="16384" />
    binding>
  <wsHttpBinding>
<bindings>
Tanner
Thanks for suggestion Tanner, I had a look at this. While i don't control the code on the server but I can change the web.config.The binding looks slightly different, think this is the relevent piece though.. seems to be set up to allow large data volumes.. <basicHttpBinding><binding name="wsWithText" maxReceivedMessageSize="665536" messageEncoding="Text"/>....</basicHttpBinding>
TygerKrash
Thanks. Turns out all I had to do was add the same <readerQuotas> element my binding.
TygerKrash