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

The Archive Base Latest Questions

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

I have an IIS7 hosted service that I need to expose to two different

  • 0

I have an IIS7 hosted service that I need to expose to two different clients. For one of the client I need to enforce a more strict Throttling behaviour than the other.

This means I need to define Two tags and because these can only be referenced from a tag, then I need two of these also?

I have defined the following web.config. Problem is, when I try to browse to either service so that I can pull the metadata then I get the following error:

Parser Error Message: A child element named 'service' with same key already exists at the same configuration scope.
Collection elements must be unique within the same configuration scope (e.g. the same application.config file). Duplicate key value:  'WCFTwoEndpoints.Calculate'.

Am I going about this the right way?

<system.serviceModel>
    <services>
      <service name="WCFTwoEndpoints.Calculate" behaviorConfiguration ="NotThrottled">
        <endpoint address="http://localhost/WCFTwoEndpoints/Calculate.svc"
          binding="wsHttpBinding" bindingConfiguration="" name="Calculator"
          contract="WCFTwoEndpoints.ICalculate" />
        <endpoint binding="mexHttpBinding" name="mex" contract="IMetadataExchange" />
      </service>
      <service name="WCFTwoEndpoints.Calculate" behaviorConfiguration ="Throttled">
        <endpoint address="http://localhost/WCFTwoEndpoints/ThrottledCalculate.svc"
          binding="wsHttpBinding" bindingConfiguration="" name="ThrottledCalculator"
          contract="WCFTwoEndpoints.ICalculate" />
        <endpoint binding="mexHttpBinding" name="mex" contract="IMetadataExchange" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="NotThrottled">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
        <behavior name="Throttled">
          <serviceMetadata httpGetEnabled="true" />
          <serviceThrottling maxConcurrentCalls="19" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  • 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-28T06:28:18+00:00Added an answer on May 28, 2026 at 6:28 am

    You are a little stuck, because the name of the key must match exactly the name of your service class.

    The only way around this I can think of, would be to create a new class which inherits from WCFTwoEndpoints.Calculate. Then you would have a distinct name. It’s not very nice though.

     

    I think if you asked the WCF designers why they designed it like this, they would say that a serivce is supposed to be indepent of the client. What you want here is not really a single service; but two different independant services which just happen to have some implementation in common. From the clients point of view they would not behave like one single service.

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

Sidebar

Related Questions

We have a WCF service, hosted on IIS7.5, that has to fetch some data
Hi, I have a WCF service hosted in IIS7 that runns the following code
I have a simple WCF service hosted in IIS7 using the HTTP protocol. The
I have done a work which contains two parts WCF service which is hosted
I have a simple WCF service hosted in IIS7.5 exposed over a wsHttp binding
I have a WCF service hosted in IIS7. This is the app.config for my
I have a WCF webservice that is hosted in IIS 7.5. Inside the Service
I have a WCF web service hosted in IIS7 which is reporting its endpoint
I have a WCF service that's hosted on IIS 7 using a basicHttpBinding .
I have a WCF service hosted in IIS7.5 running as a specific domain account.

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.