I've been going over data contracts for WCF lately and wanted to post a few specifics. One issue I ran into recently was odd, as it included an enumeration that needed to be included in part of a data contract. I had tagged the enumeration with the [DataContract] attribute but I was receiving an odd issue about the service disconnecting. The error message I was getting was something like this:

I had read, or thought via failed comprehension, that I could just tag an enumeration with [DataContract] as below.
1: [DataContract]
2: public enum Priority
3: { 4: Low,
5: Medium,
6: High
7: }
As it turns out though, the [EnumMember] attribute needs added to the enumeration.
1: [DataContract]
2: public enum Priority
3: { 4: [EnumMember]
5: Low,
6: [EnumMember]
7: Medium,
8: [EnumMember]
9: High
10: }
After I added that, smooth sailing resumed. So don't just tag the enumeration, tag the members too. I'm also working on some other notes from my reintroduction to WCF (I've done a ton of work with it in the past) so stay tuned for that.