title: WCF: Serialize complex objects with read-only members
body: <p>Looking for some guidance on a WCF service I’m prototyping. </p>
  
  <p>I have a WCF service hosted in IIS that will pass data to my clients. I have a separate shared assembly that contains all my business objects that is referenced in my WCF project.</p>
  
  <p>I want to have a few of the properties in these business objects read only as I don’t want my customers to be able to change these fields in their client code.</p>
  
  <p>I read that decorating classes with the [DataContract] attribute enforces the proper serialization to maintain readonly fields but when I implement it the proxy classes generated in the client show as writable.</p>
  
  <p>Are there any tricks to accomplish this?</p>
  
  <p>Thanks!</p>
  
  <p>/Eric</p>