Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using WCF Architecture,When i am inserting an image into Sql server i am getting an error The remote server returned an error: (400) Bad Request.some time it shows the error like '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 31245.'.
Posted
Updated 26-Feb-10 0:35am
v2

1 solution

In your web.config file search for the < readerQuotas

and change it to
<readerQuotas maxDepth="2147483647" 
  maxStringContentLength="2147483647"
  maxArrayLength="2147483647" 
  maxBytesPerRead="2147483647" 
  maxNameTableCharCount="2147483647" />


This will allow you to upload 2GB file size. or If you just want to test your code then upload a image which is less than 16KB (default size).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900