I get an error when trying to send a data collection to our service. If, however, I add only one item to the collection, then it works fine. As soon as I add more than one element, I get the following error:
Using the type "SmartTrade.Shared.Common.PaymentTerm" as a get-only collection is not supported by NetDataContractSerializer. Consider labeling a type with the CollectionDataContractAttribute attribute or the SerializableAttribute attribute, or add the set property to it.
So, the main thing to note is that I can send a collection (IList <>) with one element. I have increased MaxReceivedMessageSize and MaxArrayLength to a more reasonable one.
Can anyone help me here
source
share