|
-
Mar 11th, 2009, 07:18 PM
#1
[RESOLVED] Unable to use ReadOnly Properties in WCF DataContract
This took me sooo long to figure out but now that I have finally found that changing my Read Only properties to normal properties with a Get and Set allows them to be used as DataMembers in a WCF DataContract, I am a little confused as to why this is the case... and if there is a way around this. I guess there is no real harm in them not being readonly but it just seems odd that you dont get any warning in VS that this is invalid when you add the <DataMember> tag to the properties, its just that when you try and query the MEX endpoint of the service it fails saying that it cannot resolve a reference. As soon as you change the properties from ReadOnly it works fine.
Puzzling.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|