I will explain my class design
public class A
{
public Ilist<B> Something { get; set; }
}
public class B
{
public A ParentA { get; set; }
}
Now I am trying to pass A over WCF and it just throws an exception. Is there some attribute I have to set to get this to work or is it not at all possible in WCF
Try decorating class A with:
And class B with only:
That will tell WCF that these are types you’re going to be using in your service, and
IsReferencewill take care of the circular reference problem as well as cutting down on the size of your message. You might also try playing around with puttingIsReferenceon B and not on A – I don’t recall exactly how it behaves off the top of my head.