1

I'm getting this error message ...

"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"

... 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.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
TygerKrash
  • 1,362
  • 2
  • 20
  • 38

2 Answers2

3

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>
Sachin Shanbhag
  • 54,530
  • 11
  • 89
  • 103
Tanner
  • 22,205
  • 9
  • 65
  • 83
  • 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.. .... – TygerKrash Apr 16 '10 at 16:37
  • Thanks. Turns out all I had to do was add the same element my binding. – TygerKrash Apr 17 '10 at 16:39
1

I have fixed the problem by adding a default binding under basicHTTPBinding, just like in http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/d5b7ac03-70f8-4366-b055-c177c61f4dec/

The necessary modification was done to the client.

artcoding
  • 11
  • 1