![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| 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! |
| | #2 (permalink) |
| 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 |
| | #3 (permalink) |
| 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 |
| | #4 (permalink) |
| 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 |
| | #5 (permalink) |
| 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 | |
| |