Search code examples
wcfwcf-ria-services

TypeNotSerializable Arguments: Exception in WCF


We have an application in Silverlight ,WCF RIA and Entity Framework. Ever since i added a property to a class in the back end which is of type List<string> we are getting the error below sometimes, in Production Environment

[TypeNotSerializable] Arguments: System.Linq.Enumerable+<ExceptIterator>d__99`1[System.String] Debugging resource strings are unavailable.

I tried including a [KnownType(typeof(List<string>))], but still we are getting this error occasionally. Please let me know how to get rid of this error.

Thanks !


Solution

  • It would appear someone is using IEnumerable.Except and not calling .ToList which is causing the iterator to still be in the structure when it is being serialized.