WCF DataContract deserialization of complex types

Posted by Meidan Alon on Stack Overflow See other posts from Stack Overflow or by Meidan Alon
Published on 2008-12-28T17:27:32Z Indexed on 2010/05/17 6:00 UTC
Read the original article Hit count: 327

Filed under:
|

Hi,

I have a service that returns a collection of MyClass objects. If all of the MyClass instances have null in MyClass2Reference then everything works fine. Otherwise, I get a "Connection reset" error on the client side. What am I doing wrong?

Nevrmind: was a problem with NHibernate lazy proxy objects.

[DataContract]
public MyClass
{
[DataMember]
int ID;
[DataMember]
MyClass2 MyClass2Reference;
}

[DataContract]
public MyClass2
{
[DataMember]
int ID;
[DataMember]
string Name;
}

© Stack Overflow or respective owner

Related posts about wcf

Related posts about serialization