views:

102

answers:

1

I'm working on a Silverlight client that interacts with a WCF web service. The Silverlight client and the WCF web service are using the same class library for their data entities that they are passing back and forth over the wire. I just added a new entity, and it's not being correctly deserialized on the Silverlight client.

My question is, how can I debug the System.ServiceModel.ClientBase as it is deserializing an entity that it received from a WCF web service?

A: 

I ended up writing the serialized entity to a file on the WCF web service side, and then opening that file from the Silverlight client, and deserializing the entity using the DataContractSerializer. This uncovered some problems with the entity (I was missing the [EnumMember] attribute over an enumeration used by the Entity).

However, it did not help me troubleshoot another problem, where some properties of the entity were null after deserialization. This problem, as it turns out, is that the entity class did not list its properties alphabetically (and did not provide the Order attribute).

Andrew Garrison