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 7528463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:23:16+00:00 2026-05-30T04:23:16+00:00

I have a DTO which I have decorated properties with [Display(Name = My Display

  • 0

I have a DTO which I have decorated properties with [Display(Name = “My Display Name”)].

I’m using WCF services but the attribute does not appear to be working. On inspecting my service reference the generated DTO client side does not have the attribute applied.

Maybe I’m doing something wrong?

  • 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-05-30T04:23:17+00:00Added an answer on May 30, 2026 at 4:23 am

    The class and object you created server-side doesn’t exist client-side. When you are using WCF, you are serializing an instance of a class to data (typically XML, but it could also be binary depending on your binding), sending it across the internet, and then deserializing it into an instance of a similar class client-side. This similar class is typically created by the Service Reference based on the WSDL of the service.

    This is why private fields on your server-side class do not appear on your client-side class. If you want the attributes available client-side, you’re going to have to manually add them client-side.

    That having been said… if you control both the server and client, there are tricks you can use to ensure you use the same class on both sides. The simplest is to put all of your DataContract classes into a separate assembly and reference it from both the server and client. If you use a Service Reference to generate your client-side proxy, be sure to check “Reuse types in referenced assemblies” when generating the proxy.

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

Sidebar

Related Questions

We are using Dtos in our WCF service interface, but have started to come
I have a DTO which can be fully loaded or lazy loaded using Lazy
I have one DTO which has only the simple properties on it. I would
I have a data access layer which returns an IDataRecord. I have a WCF
I have a number of WCF calls which I would like to have a
I have been using BinaryFormatter to serialise data to disk but it doesn't seem
I have a Flex object which collects a DTO from the server. All the
I have the following test using NMock which fails. It used to work when
We have an existing application for which one of our DTO object has a
I have a source object which has: public class Source { public Map<String,DTO>getDTOs(); }

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.