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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:03:54+00:00 2026-06-17T07:03:54+00:00

First off I’ll apologise as this is probably a duplicate but everything I read

  • 0

First off I’ll apologise as this is probably a duplicate but everything I read seems to be either incomplete or confusing as I’m very new to WCF.

I basically am looking to deploy a WCF service in IIS with 2 endpoints accessible and have been going around in circles all day 🙁

I have a service library WCF dll with the following structure

App.config
TestSvc1.cs
ITestSvc1.cs
TestSvc2.cs
ITestSvc2.cs

This works fine in the VS WCF test client and now im deploying to IIS so I created a WCF Service Application and referenced the dll. This project has the following structure

Service1.svc
Web.config

Service1.svc contains this

<%@ ServiceHost Language="C#" Debug="true" 
    Service="WCFServices.TestServices.ITestSvc1" CodeBehind="Service1.svc.cs" %>

and my web.config has the following

<services>
   <service name="WCFServices.TestServices.TestSvc2">
      <endpoint 
          address="" 
          binding="wsHttpBinding" bindingConfiguration="LargeSizeMessages" 
          contract="WCFServices.TestServices.ITestSvc2">
          <identity>
            <dns value="localhost" />
          </identity>
      </endpoint>
      <endpoint 
           address="mex" 
           binding="mexHttpBinding"  
           contract="IMetadataExchange" />
      <host>
         <baseAddresses>
            <add baseAddress="http://localhost:8080/wcf2/TestServices/TestSvc2/" />
         </baseAddresses>
      </host>
   </service>
   <service name="WCFServices.TestServices.TestSvc1">
      <endpoint 
          address="" 
          binding="wsHttpBinding" bindingConfiguration="LargeSizeMessages" 
          contract="WCFServices.TestServices.ITestSvc1"  
          listenUri="http://localhost:8080/wcf2/service1.svc">
          <identity>
            <dns value="" />
          </identity>
      </endpoint>
      <endpoint 
          address="" 
          binding="wsHttpBinding" bindingConfiguration="LargeSizeMessages" 
          contract="WCFServices.TestServices.ITestSvc2" 
          listenUri="http://localhost:8080/wcf2/service1.svc">
          <identity>
            <dns value="" />
          </identity>
      </endpoint>
      <endpoint address="mex" binding="mexHttpBinding"  contract="IMetadataExchange" />
      <host>
         <baseAddresses>
            <add baseAddress="http://localhost:8080/wcf2/TestServices/TestSvc1/" />
         </baseAddresses>
      </host>
   </service>     
</services>

Any help would be greatly appreciated. As you can see I’ve tried to add an additional endpoint in the web.config but this doesn’t work, I get an error saying that TestSvc2 calls can’t be found in TestSvc1 which I guess relates to the entry in Service1.svc

I also read about creating a class that inherits these interfaces but I am not sure exactly how to implement it based on what I have above. Do I need to modify the Service1.svc?

public interface MultipleSvc : ITestSvc1, ITestSvc2
{
   // What exactly do I put here? I have no idea, do I leave it blank? This didn't work for me
}

Any help would be greatly appreciated guys thanks 🙂

  • 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-17T07:03:55+00:00Added an answer on June 17, 2026 at 7:03 am

    Golden rule: one .svc = one service (or more specifically: one service implementation class)

    So if you do have two separate, distinct services (in classes WCFServices.TestServices.TestSvc1 and WCFServices.TestServices.TestSvc2), then you need two .svc files (one each, for each service)

    What you could do is have one service implementation class that implements both service contracts:

    public class MultipleServices : ITestSvc1, ITestSvc2
    {
       // implement the service logic here, for both contracts
    }
    

    In that case, one svc file will be enough (the .svc file is per implementation class and can host multiple service contracts). But then you’d need to change your config, too – since you really only have one service class (therefore: one <service> tag) and multiple contracts hosted inside it:

    <services>
       <service name="WCFServices.TestServices.MultipleServices">
          <endpoint 
              address="Service1" 
              binding="wsHttpBinding" bindingConfiguration="LargeSizeMessages" 
              contract="WCFServices.TestServices.ITestSvc1">
              <identity>
                <dns value="" />
              </identity>
          </endpoint>
          <endpoint 
              address="Service2" 
              binding="wsHttpBinding" bindingConfiguration="LargeSizeMessages" 
              contract="WCFServices.TestServices.ITestSvc2">
              <identity>
                <dns value="localhost" />
              </identity>
          </endpoint>
          <endpoint 
               address="mex" 
               binding="mexHttpBinding"  
               contract="IMetadataExchange" />
       </service>     
    </services>
    

    Also: since you seem to be hosting your WCF service in IIS, there’s no point in defining any <baseAddress> values – the “base” address of your service is the location (URI) where the *.svc file lives.

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

Sidebar

Related Questions

First off, please forgive the stupidness of this question but Im not from a
First off, either A) I'm not investigating into this hard enough or B) I've
First off, I am wondering if this is possible. I read slight grumblings around
First off, thanks for taking the time to read this question. What a great
first off I'm a noob to PHP but here is my problem. I am
First off I use this code to make the navigation bar always stay fixed;
First off tags wont work. I say this because i create 4 buttons all
First off, I am a complete noob. Please respond as if teaching this to
First off I want to say I saw a couple of posts on this
first off I'm very new to rails - I'm playing about with a little

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.