Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

maxArrayLength

 
 
Thread Tools Display Modes
Old 08-13-2007   #1 (permalink)
Marty
Guest


 

maxArrayLength

I am getting the following error:

The maximum array length quota (16384) has been exceeded while reading XML
data. This quota may be increased by changing the MaxArrayLength property on
the XmlDictionaryReaderQuotas object used when creating the XML reader.

I have tried to increase the maximum array length using the following
configuration on the client and server:

<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_DocumentService"
maxReceivedMessageSize="4655360">
<readerQuotas maxArrayLength="4655360"/>
</binding>
</wsHttpBinding>

The field in question is an array of bytes. It works fine until I exceed
16000+ bytes, regarldess of whether I increase the maxArrayLength field or
not. I appreciate any help that you could provide.

Thanks!


Old 08-15-2007   #2 (permalink)
Vadym Stetsiak
Guest


 

Re: maxArrayLength

Hello, Marty!

Do you set also set MaxBufferSize property?

You wrote on Mon, 13 Aug 2007 13:04:02 -0700:

M> The maximum array length quota (16384) has been exceeded while reading
M> XML data. This quota may be increased by changing the MaxArrayLength
M> property on the XmlDictionaryReaderQuotas object used when creating the
M> XML reader.

M> I have tried to increase the maximum array length using the following
M> configuration on the client and server:

M> <bindings>
M> <wsHttpBinding>
M> <binding name="WSHttpBinding_DocumentService"
M> maxReceivedMessageSize="4655360">
M> <readerQuotas maxArrayLength="4655360"/>
M> </binding>
M> </wsHttpBinding>

M> The field in question is an array of bytes. It works fine until I
M> exceed 16000+ bytes, regarldess of whether I increase the maxArrayLength
M> field or not. I appreciate any help that you could provide.


With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com


Old 08-15-2007   #3 (permalink)
Marty
Guest


 

Re: maxArrayLength

Vadym

Thanks for your help! I have been able to get the array size larger, but
now it won't go larger than around 2 meg (2355246). I don't know the
significance of that number. I can't find a maxBufferSize property. I am
using wsHttpBinding. I do see it in the basicHttpBinding. I did try
increasing the maxBufferPoolSize, without any luck. I'll attach the
configuration which is the same on both the client and server:

<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_DocumentService" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxArrayLength="2147483647"/>
</binding>
</wsHttpBinding>
</bindings>

I tried debugging, and it gets an error before it makes it to the server
side on the large message. A message of size 2355246 will make it to my
service, and I can trace execution with the debugger. A message of size
2355247 doesn't make it to my service. So, I don't think it's a bug in the
service.

Also, I am using IIS.

Thanks for your help!
Marty


Old 08-16-2007   #4 (permalink)
Vadym Stetsiak
Guest


 

Re: maxArrayLength

Hello, Marty!

Indeed, there is no maxBufferSize in WsHttpBinding.

You can try to tune data serializer e.g. <dataContractSerializer
maxItemsInObjectGraph="int.MaxValue?"/>
and in readerQuotas set everything to max value.

HTH


You wrote on Wed, 15 Aug 2007 11:46:05 -0700:

M> Vadym

M> Thanks for your help! I have been able to get the array size larger,
M> but now it won't go larger than around 2 meg (2355246). I don't
M> know the significance of that number. I can't find a maxBufferSize
M> property. I am using wsHttpBinding. I do see it in the
M> basicHttpBinding. I did try increasing the maxBufferPoolSize,
M> without any luck. I'll attach the configuration which is the same
M> on both the client and server:

M> <bindings>
M> <wsHttpBinding>
M> <binding name="WSHttpBinding_DocumentService"
M> maxBufferPoolSize="2147483647"
M> maxReceivedMessageSize="2147483647">
M> <readerQuotas maxArrayLength="2147483647"/>
M> </binding>
M> </wsHttpBinding>
M> </bindings>

M> I tried debugging, and it gets an error before it makes it to the
M> server side on the large message. A message of size 2355246 will
M> make it to my service, and I can trace execution with the debugger.
M> A message of size 2355247 doesn't make it to my service. So, I
M> don't think it's a bug in the service.

M> Also, I am using IIS.

M> Thanks for your help!
M> Marty


With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com


Old 08-22-2007   #5 (permalink)
Marty
Guest


 

Re: maxArrayLength

Thanks, Vadym, for your help! We finally figured out what was causing the
problem. It was an IIS configuration that needs to be added to the
Web.config file on the server side of the WCF service as follows:
....
<system.web>
<httpRuntime
executionTimeout="1200"
maxRequestLength="102400"
useFullyQualifiedRedirectUrl="false"
minFreeThreads="8"
minLocalRequestFreeThreads="4"
appRequestQueueLimit="100" />
....

The specific problem was with the maxRequestLength defaulting to about 4 Meg
in IIS. Apparently the values configured in WCF don't override IIS. You
still need the httpRuntime configuration above.

Thanks again,
Marty



 

Thread Tools
Display Modes









Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50