This isn't a CSLA problem, but I thought you guys might be able to help.
I've a Silverlight application that works fine for a singleton object and it works fine for a collection object provided that the collection has no more than two objects. That is, I'm having problems with a root collection wherein the first and second object may be created and saved but when third object is created the save will return: The remote server returned an error: NotFound
Fiddler says it's a http 500 error.
The collection contains small objects - 10 properties of no more nvarchar(50) per object. No pictures, no video, nothing fancy. Just boolean, guid, string, integers - that's it. I've cleaned out the database and tried adding the same 3 objects by adding each and then saving, or adding all three at a time and then saving but the 3 is just "over the limit" for some reason.
In the web.config file I have this, so I don't think it's a size issue:
httpRuntime maxRequestLength="10000" executionTimeout="3600"
I'm baffled.
There are two places where size comes into play. One is the "maxRequestLength" property in the HTTP stream. The other is the message/buffer sizes in the WCF configuration. You might check there as well - the defaults are pretty small (and measures in bytes, not KB).
HTH
- Scott
I used the trace feature to get it down to this 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. Line 1, position 25871.
In my servicereference.clientconfig file I have:
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647"
In web.config I have:
httpRuntime maxRequestLength="2147483647" executionTimeout="3600"
And that would be another one...
Inside the "binding" element is a "readerQuotas" element. It's probably not there in your web.config, but that's where it goes. This has attributes that define the maximum number of items in an array that are allowed (maxArrayLength), along with a few other "max" options. As you can see, the default limit is 16K, and you seem to be going beyond that.
Do not confuse this with the "maxItemsInObjectGraph" serialization behavior attribite - that defines the overall maximum number of objects you can send back in a response.
(And if you'd like, I can probably find three or four more of these types of things. And you wonder why people complain that WCF configuration is so stinking complex...)
HTH
- Scott
Thanks for the help. I thought I was losing my mind.
Copyright (c) Marimer LLC