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

The Archive Base Latest Questions

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

I have converted my web service to wcf service which has some datacontracts. As

  • 0

I have converted my web service to wcf service which has some datacontracts. As a best practice it is mentioned and advisable that the DataContracts should inherit from IExtensibleDataObject. I get the point that in case of addition or removal of datamembers, IExtensibleDataObject is helpful. But i am not able to get how will the clients access removed datamembers. Here is my code:

[ServiceContract(Namespace = "http://mycompany.com/2010/08/")]
public class MyWebService {
    [OperationContract]
    public Employee Add(Employee emp)
    {
        // Some Processing
    }
}

[DataContract(Name = "Employee", Namespace = "http://mycompany.com/2010/08/")]
public class Employee : IExtensibleDataObject {
    [DataMember] public string FirstName;
    [DataMember] public string LastName;

    public ExtensionDataObject ExtensionData  { get; set; }
}

Now in my next version of web service I made some changes to DataContract as

[DataContract(Name = "Employee", Namespace = "http://mycompany.com/2010/09/")]
public class Employee : IExtensibleDataObject {
    [DataMember] public string FirstName;
    [DataMember] public string LastName;
    [DataMember(IsRequired = true)] public string MiddleName;

    public ExtensionDataObject ExtensionData  { get; set; }
}

However my client that is accessing my older version of web service is now getting error for not supplying the MiddleName field. I am still confused for the usage of IExtensionDataObject.

  • 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-16T03:36:31+00:00Added an answer on May 16, 2026 at 3:36 am

    I’m afraid that’s not the correct usage of IExtensibleDataObject, the IExtensibleDataObject interface is designed to support version round-tripping, have a read of this MSDN article on forward compatibility:

    http://msdn.microsoft.com/en-us/library/ms731083.aspx

    And here’s another article on best practices on Data Contract versioning in general:
    http://msdn.microsoft.com/en-us/library/ms733832.aspx

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

Sidebar

Related Questions

I have a WCF web service that exposes several business methods. I also have
I have a wcf service which has a method as follow: public void SyncClient(List<Client>
I'm building a WCF web service which returns a composite object that looks similar
I have a WCF/REST web service that I'm considering using Linq to SQL to
I have a WCF client proxy which reads from a SOAP web service. I
I have build a wcf web service that simply provides MS Dynamics SQL data
I have created a WCF web service that connects to an XMPP service with
I have a currency converter application for iphone which uses web service. The web
I have a simple web service method which I'm trying to convert: <WebMethod()> _
I have a WCF web service called by an ASP .Net web site. In

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.