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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:18:42+00:00 2026-05-15T06:18:42+00:00

In my solution there’s a few WCF services, each of them implementing it’s own

  • 0

In my solution there’s a few WCF services, each of them implementing it’s own callback interface. Let’s say they are called: Subscribe1, with ISubscribe1 and ICallback1, etc.

It happens there are a few methods shared among ICallbacks, so I made a following interface:

interface ICallback
{
    [OperationContract]
    void CommonlyUsedMethod();
}

and i inherited it in all: ICallback1 : ICallback, ICallback2 : ICallback, etc. And deleted the CommonlyUsedMethod() from all callback interfaces.

Now, on the service-side code, everything compiles fine and services can start working as usual. But, when I updated the service references for the client, CommonlyUsedMethod() dissapeared from the reference.cs file (the ISubscribeCallback part), and could no longer be used to send data to back to the client.

  • 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-15T06:18:43+00:00Added an answer on May 15, 2026 at 6:18 am

    Ok, this is the exact code, I condensed it as much as I can. Just start a new console application and copy/paste it. Start it and add a service reference to it. CommonlyUsedMethod() is not present in the reference, while the other methods are. Could it be framework 4?

    using System;
    using System.ServiceModel;
    using System.ServiceModel.Description;
    
    namespace TestService
    {
        class Program
        {
            static void Main()
            {
                var serviceHost=new ServiceHost(typeof(Subscribe1), new Uri("net.tcp://localhost:8888"));
                serviceHost.Description.Behaviors.Add(new ServiceMetadataBehavior());
                serviceHost.AddServiceEndpoint(typeof(ISubscribe1), new NetTcpBinding(SecurityMode.None), string.Empty);
                serviceHost.AddServiceEndpoint("IMetadataExchange", MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
                serviceHost.Open();
    
                Console.WriteLine("Working!");
                while(Console.ReadKey(true).Key!=ConsoleKey.Escape) { }
            }
        }
    
        [ServiceContract]
        interface ICallbackBase
        {
            [OperationContract]
            void CommonlyUsedMethod();
        }
    
        [ServiceContract]
        interface ICallback1 : ICallbackBase
        {
            [OperationContract]
            void SpecificMethod();
        }
    
        [ServiceContract(CallbackContract=typeof(ICallback1))]
        interface ISubscribe1
        {
            [OperationContract]
            void TestMethod();
        }
    
        [ServiceBehavior]
        class Subscribe1 : ISubscribe1
        {
            [OperationBehavior]
            public void TestMethod()
            {
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's a similar question - but I can't make the solution proposed there work.
Is there any solution for converting Wav to Ogg or MP3 by using pure
Is there a solution for Towers of Hanoi whose running time is less than
Is there any solution to overcome case-sensitive problem for contains method. I have code
is there any solution to show user all countries and after select country it
My question is very simple: Is there any solution to install xCode, or equivalent,
Rails has the rest autho plugin which works well but is there a solution
Is there any integrated solution for this? Would it work if I create a
Is there a simple solution to trim whitespace on the image in PIL? ImageMagick
Is there a better solution to the problem of looking up multiple known IDs

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.