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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:40:12+00:00 2026-05-25T16:40:12+00:00

I have a Scneario like this in my Server DLL class library. [DataContract] public

  • 0

I have a Scneario like this in my Server DLL class library.

 [DataContract]
public class Base
{
    [DataMember]
    public string Info { get; set; }
}

[DataContract]
public class Child : Base
{
    [DataMember]
    public new int Info { get; set; }


    public int Save()
    { 

    }
}

My WCF Proxy at client side creates a Reference class. It Renames “Info” to “Info1”. And shows proper properties in Base class.My code compiles great. So far so good. When I try to run ChildProxy.Save() from my client it gives me error Saying

“There was an error while trying to serialize parameter http://tempuri.org/:info. The InnerException message was ‘Type ‘ClientServiceLayer.InfoService.Info’ with data contract name ‘ArrayOfInfo:http://schemas.datacontract.org/2004/07/Info_DLL’ is not expected. Add any types not known statically to the list of known types – for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.’. Please see InnerException for more details.
”

How to hide the property of base class in WCF?

UPDATE:

Here is the call on the client-side

InvoiceServiceClient infoProxy = new InfoServiceClient(); 
invId = invfoProxy.Save();
  • 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-25T16:40:12+00:00Added an answer on May 25, 2026 at 4:40 pm

    As stated here:

    You can’t. Although the Child class is “hiding” the Info property of its base class, the attribute is being read by the serializer.

    You could try adding [DataMember(Name = “Info”)] to the child class and see what happens.

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

Sidebar

Related Questions

I have a method like this in my class which extends Activity @Override public
I have a DataGrid that looks like this (slightly simplified here): <asp:DataGrid ID=grdQuotas runat=server
I have a Clojure network application, basic structure is like this: Server has one
I have a scenario like this <asp:RadioButton ID=userActiveYesRadioButton GroupName=activeGroup Text=Yes runat=server TabIndex=4 />&nbsp; <asp:RadioButton
I have a scenario like this: I need to pass @id to the stored
I have a scenario like this: form = MockRepository.GenerateMock<IAddAddressForm>(); mediator = new AddAddressMediator(form); The
I have a scenario that looks like this: #include <algorithm> using namespace std; //
If I have a simple cucumber feature and scenario , like this (example code
In a multithreaded scenario, I have a method like this: bool WaitForChange( time_duration WaitTime
I have this scenario where I would like to redirect my domains using the

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.