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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:07:22+00:00 2026-06-05T19:07:22+00:00

How can I write a WCF web service that has single endpoint but multiple

  • 0

How can I write a WCF web service that has single endpoint but multiple service contract?

Example:

[ServiceContract]
public interface IWirelessService
{
    [OperationContract]
    void AddWireless();
}

[ServiceContract]
public interface IWiredService 
{
    [OperationContract]
    void AddWired();
}

[ServiceContract]
public interface IInternetService
{
    [OperationContract]
    void AddInternet();
}

Lets think like IInternetService is my main webs service and i want to implement IwiredService and IWirelessService in it, but i want to do implementation in their classes.Is this possible? How can i solve this problem?

  • 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-06-05T19:07:24+00:00Added an answer on June 5, 2026 at 7:07 pm

    I have given the below example is it what you were looking for?

    [ServiceContract]
    public interface IWirelessService : IInternetService
    {
        [OperationContract]
        Connection AddInternet();
    }
    
    [ServiceContract]
    public interface IWiredService : IInternetService
    {
        [OperationContract]
        Connection AddInternet();
    }
    
    public class WirelessService : IWirelessService 
    {
       public Connection AddInternet()
       {
       //Get Internet the wireless way
       }
    
    }
    
    public class WiredService : IWiredService 
    {
        public Connection AddInternet()
        {
        //Get Internet the wired way
        }
    }
    
    [ServiceContract]
    public interface IInternetService
    {
        [OperationContract]
        Connection AddInternet();
    }
    
    
    [ServiceContract]
    public interface IEnterpriseApplicationService
    {
        [OperationContract]
        void GetDataFromInternet(string url, IInternetService internetService);
    }
    public class InternetProviderService : IEnterpriseApplicationService
    { 
        public HTMLResponse GetDataFromInternet(string url, IInternetService internetService)
        {
           Connection con = internetService.AddInternet();
           return con.GetContentFromURL(url);
        }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wanting to write a WCF web service that can send files over
I'm trying to write a WCF Web service that will return my data as
This application has a WCF web service that is called by a WinForms app.
I have to write a WCF service that consumes a third party 'Web Service'.
I'm working with a WCF web service project and using log4net, but can't get
I'm trying to write a WCF wrapper web service for a WSE3/ASMX web service.
I recently posted a question about a WCF Restful web service that I am
Imagine this scenario: you have a WCF web service that gets hit up to
I have a silverlight 2 beta 2 application that accesses a WCF web service.
I have a WCF web service that uses ASP.NET session state. WCF sets a

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.