Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8060837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:07:34+00:00 2026-06-05T10:07:34+00:00

Ok so I have two objects that look like this in my WCF service.

  • 0

Ok so I have two objects that look like this in my WCF service. When my MyProfile property in my User class comes back to the client all of its properties are null; however, nothing else is.

[DataContract]
[Serializable]
public class User { 

    private WebProfile.UserTable _MyProfile;

    public WebProfile.UserTable MyProfile { 
        get { return _MyProfile; }
        set { _MyProfile = value; }
    }
}

[DataContract]
[Serializable]
public class WebProfile { 

    [DataContract]
    [Serializable]
    public class UserTable { 

    }
}

On the WCF service it looks like this.

#region User Contract...
[ServiceContract]
public interface IUser {
    List<User> GetAllUsers();
}
#endregion

public List<User> GetAllUsers() {
    return _users;
}

I have only listed the property in question because I believe its specific to that property being in a subclass.

Here is what I have done. I have verified that the data is actually being obtained from the database on the service end from the database. Also, that MyProfile has values for its properties via Event Log.

When the client requests a list of Users I write to the event log on the server hosting the service to make sure MyProfile’s properties have values. So the issue is either when the client deserializes the information or when the server serializes it to send to the client. Is it possible that my WebProfile class needs to be decorated with some type of attribute?

Again, I have verified that the User is coming back with values for all of its extra properties and that before the object leaves the server that the values are populated.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:07:36+00:00Added an answer on June 5, 2026 at 10:07 am

    None of the class’s properties for said object were decorated with the [DataMember] attribute.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a few Django models that look like this: class City(models.Model): name
I have a collection of objects that look like this: List<MyObject> objects = new
Suppose that I have two objects with the same property name that I am
I have a class that contains objects of two other classes. I need one
Let's say we have a class that looks like this: class A { public:
I have several objects in C# that's roughly like this: A: { Id: 1,
I have two classes which look like this in barebones form: @interface GraphNode {
I have two objects that can be represented as an int, float, bool, or
I have two LinkedList objects that are always of the same size. I want
I have a list of objects that have two int properties. The list is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.