Read-Only Properties Cannot Be Exposed by XML Web Services

I recently encountered this problem when I was trying to return a simple object with several public properties. It seems one of the properties was not being exposed in the XML returned by the web service. I wondered what could be the difference when I stumbled upon this thread:

C# get property not visible in Web Services General

which led to this KB article:

Read-Only Properties Cannot Be Exposed by XML Web Services

It seems this is by design. The workaround would be to create an empty setter for it.

Bookmark and Share

About admin

Freelance Web Developer C# .NET, PHP5 Zend Framework, Flex/Actionscript
This entry was posted in Programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>