When creating WCF client can only access private fields RRS feed

  • Question

  • Hello,

    It's been a few years since I've written a WCF service and I've noticed something rather strange.

    I have created a Request class for the service using VS XSD tool it's simple enough.
    The class has private properties and public get sets and in the service when i create a new request object I correctly see just the public getter and setters.

    However when I create a client I can ONLY see the private fields, really not sure whats going on here.


       private string e_mail_addressField;

        public string e_mail_address {
            get {
                return this.e_mail_addressField;
            set {
                this.e_mail_addressField = value;

    When I create a new instance of the request object I set the email address with request.e_mail_address = ""; Which is what I expect.
    When I try to set the email address on the client I only have access to e_mail_addressField so request.e_mail_addressField = ""; can anyone tell me why this is?

    I feel like it has something to do with the way my request class is serialized? 

    Thanks very much!!


    Thursday, August 28, 2014 4:29 PM


All replies