21 February, 2012

WCF IEnumerable DataContracts bug

Kept getting an error while using SoapUI to create valid requests for a WCF web service hosted in IIS.
While debugging the operation executed without any problems, but the client always got a connection error (java.net.SocketException: Connection reset).
Turns out there is a bug in WCF when serializing a DataContract with an IEnumerable<T> member. Changed to List<T> and the problem was gone.