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

  • Home
  • SEARCH
  • 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 7178561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:56:44+00:00 2026-05-28T16:56:44+00:00

Why is the Inherited Class not exposed when I use this WCF Service Class?

  • 0

Why is the Inherited Class not exposed when I use this WCF Service Class?

[ServiceContract]
public interface IMyService
{
    [OperationContract] void DoSomething();
}

[DataContract]
public abstract class InheritMe
{
    [DataMember] public int ExposeMe { get; set; }
}

public class MyService : InheritMe, IMyService
{
    public void DoSomething() { }
}

My code is in C#, in Framework 4, build in Visual Studio 2010 Pro.

Please help, Thanks in advance.

  • 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-28T16:56:45+00:00Added an answer on May 28, 2026 at 4:56 pm

    ExposeMe is not part of the service contract. If you expect to be able to call it in client applicaitons, then you have to define it in the contract interface IMyService.

    It’s is a little wierd to have your service class (MyService) inherit from a DataContract. This serves no purpose. DataContact classes are classes that you can communicate to the client (by returning them from your service operations for example).
    The MyService class is just the implementation of your service contract – it is not visible to the client.

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

Sidebar

Related Questions

this is my inherited class of UIView : MobileView @interface MobileView : UIView {
I'd like to use SQLiteCursor class to fetch data (not using Cursor class). This
In the inherited class I use the base constructor, but I can't use the
How can I use an inherited class of a triangulation in the context of
I'm trying to force an inherited class to use a custom attribute. I'm creating
If I inherit from a class that is serializable but I specifically do not
I seem to be having a very frustrating time with an inherited class calling
How do I grab the Type of the inherited class and pass it into
In C#, if I have an inherited class with a default constructor, do I
I have 3 abstract classes (Customer, Tender, Site). For Customer has inherited class such

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.