Otis wrote:
Also, what are you doing exactly in CommonEntityBase?
I am not doing any custom serialization in CommonEntityBase. Just in case there is something else I am doing that is causing this, I have emailed my CommonEntityBase.vb to your support email address.
This is bizarre, but the problem happens when I have the following situation:
I have ParentEntity 1:N ChildEntity. I bind the ChildEntityCollection to a grid, bind a specific ChildEntity to some form controls and make an edit to one of its properties, ChildEntity.PropertyA. I then serialize the ParentEntity, deserialize, and thats where I get the exception. The exception comes from trying to deserialize the ChildEntity where I made an edit to PropertyA.
The bizarre part is that if no binding is involved, and I just make an edit to ChildEntity.PropertyA, ParentEntity will serialize and deserialize correctly.
I will try to come up with a sample that demonstrates this, but so far it is very difficult as I don't want to reproduce the exact environment that is in my real project (this would take foreever to reproduce).