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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:20:47+00:00 2026-05-15T18:20:47+00:00

I have an existing class library with all the classes to communicate with my

  • 0

I have an existing class library with all the classes to communicate with my server.
I’ve created a WCF service that will be hosted on my existing server as part of different application domain. Since I already have the classes I thought it can be exposed on my WCF service to lessen my development time.

I successfully hosted my WCF service and is running on my dev pc. The problem is on the client side that adds my web service. They can only use the base classes of my library.

How can I make all of my classes aside from the base class of my library to be available on my web service? e.g. helper classes, child classes that inherited from my base class and other classes that is used on my generic collection.

All of my classes are dressed with Serializable and DataContract attributes.

By the way my class library was created 3 years ago I just patched some new attributes to make it available on my web service.

  • 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-15T18:20:47+00:00Added an answer on May 15, 2026 at 6:20 pm

    Helper classes that are not part of the hierarchy of the classes that are part of the operation contracts will never be exposed. As for child classes you could use the <knownType> section in web.config to instruct the serializer what are the possible child classes for a given base type:

    <system.runtime.serialization>
        <dataContractSerializer>
          <declaredTypes>
            <add type="SomeNs.MyBaseType, SomeNs">
              <knownType type="SomeNs.MyChildType1, SomeNs"/>
              <knownType type="SomeNs.MyChildType2, SomeNs"/>
            </add>
            <add type="SomeNs.MyBaseType2, SomeNs">
              <knownType type="SomeNs.MyChildType3, SomeNs"/>
            </add>
          </declaredTypes>
        </dataContractSerializer>
    </system.runtime.serialization>
    

    WCF will look at the types that are part of the operation contracts (the methods marked with [OperationContract]) and it will automatically expose those classes in the metadata (WSDL) so that clients will see them. Possible child classes need to be specified explicitly.

    Also you might find this blog post helpful.

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

Sidebar

Related Questions

We have an existing WCF service that makes use of wsDualHttpBinding to enable callbacks
I have an existing POCO class library where children collections are all stored in
I have an existing library (JPhysX) that is a Java wrapper for a native
i want to create some simple wrapper classes for an existing class library. To
For whatever reason, I have a lot of clients that have existing data that's
I have an existing website that uses the same code base, but is deployed
I have an existing web app that allows users to rate items based on
I have an existing ASP.NET 2.0 website, stored in Team Foundation Server 2005. Some
Say, for example, I have many web applications using the same class library compiled
I've created a class library and built a dll (release build). I've then referenced

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.