To make a long story short:
Making a web application
Each user profile contains exactly one profile image, which is stored in the database
The bottom layer uses ADO.NET entity framework for data access and relationships between classes
Inserting images into the database on the bottom data access layer of the application works fine
On the top layer, in an MVC application, we use WCF to get the profile image to display. Displaying the image works fine no matter what the size, meaning that uploading images is the only problem.
In my Upload picture-function i can upload pictures up to 16k. Nothing bigger.
I have found all
maxBufferSize
andmaxReceivedMessageSize
properties in all app.config and web.config-files in the solution, and changed the values to 1MB (1 048 576)
This is the error i get:
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://www.mydomain.com/contracts/profile/2009/07:userProfile. The InnerException message was 'There was an error deserializing the object of type Myproject.Commons.BusinessObjects.UserProfile. 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 44978.'. Please see InnerException for more details.
It also tells me that the source file of the error is Reference.cs within the service reference. ...and now i basically cannot understand where this really comes from. Anyone has a clue?