Google is your friend -- I googled your problem and had several answers in <2 minutes.
1. That's a 3.0 property, you should be able to set it the same on any machine with WCF I believe ... 2. http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.readerquotas.aspx BasicHttpBinding binding = new BasicHttpBinding(); XmlDictionaryReaderQuotas readerQuotas = new XmlDictionaryReaderQuotas(); readerQuotas.MaxArrayLength = 25 * 1024; binding.ReaderQuotas = readerQuotas; OR <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="Binding1"> <readerQuotas maxBytesPerRead ="1000" maxDepth="100"/> <security mode="None" /> </binding> </basicHttpBinding> </bindings> 3. Consider this alternative: (very handy! I suggest implementing it just to get a feel, especially if you've never used IHttpHandler before.) http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/a095dbc2-f321-4513-bfa1-7def9d1adbb6 Next time, use The Google! I don't get paid the money I get paid because I have to ask other people to google for me ... as a technology person, it's kind of like needing your mom to hold it for you when you drain the lizard. Have some shame! ∞ Andy Badera ∞ +1 518-641-1280 ∞ This email is: [ ] bloggable [x] ask first [ ] private ∞ Google me: http://www.google.com/search?q=andrew%20badera On Tue, Oct 13, 2009 at 1:06 PM, Saak <[email protected]> wrote: > > Hi i have created a WCF service and the client is in .net2.0 > framework. I access the WCF service as a webservice in .net2.0. by > setting its binding type to BasicHttpBinding. > > I am passing a byte[ ] array to the service from the client. But the > trouble is that if the size of the byte[ ] array goes anything beyond > 18kb it gives the following error: > > The formatter threw an exception while trying to deserialize the > message: There was an error while trying to deserialize parameter > http://tempuri.org/:Contents. The InnerException message was 'There > was an error deserializing the object of type System.Byte[]. 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. Line 1, position 48027.'. Please see InnerException > for more details > > I looked up the net and found the solution if the client was created > in .net3.5. You just increase the maxArraySize value to a larger value > in the client and server web.config files and it works! > > However my client is in .net2.0 and i cant locate any <binding> tag in > the web.config file. > > Someone please suggest me a solution here. Thanks for your Help!! > > Cheers! > Saket Shriwas >
