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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:11:09+00:00 2026-05-26T18:11:09+00:00

Ok, I manage my own App.Config. I don’t need a wizard to do it

  • 0

Ok, I manage my own App.Config. I don’t need a wizard to do it for me, thank you very much. And the code that it puts in my App.Config is verbose garbage. I am capable of writing my own WCF endpoints and bindings. I just want Visual Studio 2010 to do what it is best at doing: code generation. Just give me the server and data-contract code! Is there any way to turn this off? Is there a way to call ‘Update Service Reference’ without VS changing the App.Config? Its very frustrating. Now it gives me an exception unless I completely delete all of the endpoint nodes from my App.Config.

This is the exception that I get:

There was an error downloading
‘http://localhost:8732/MyService/mex’.

The request failed with HTTP status 400: Bad Request.

A child element named ‘endpoint’ 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:
‘contractType:Web.DataService.MyService.IMyService;name:MyService.Live’.
(C:\ProjectPath\App.config line 152)

And here is my App.Config:

<system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="Binding.Debug" maxReceivedMessageSize="2147483647">
            </binding>
            <binding name="Binding.Secure" maxReceivedMessageSize="2147483647">
                <security mode="Transport">
                    <transport clientCredentialType="None"/>
                </security>
            </binding>
        </wsHttpBinding>
    </bindings>
    <client>
        <!-- Debug client endpoints -->

        <endpoint name="MyService.Debug"
                  contract="Web.DataService.MyService.IMyService" 
                  address="http://localhost:8732/MyService"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Debug"
                  />
        <endpoint name="MyService1.Debug"
                  contract="Web.DataService.MyService1.IMyService1" 
                  address="http://localhost:8732/MyService1"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Debug"
                  />
        <endpoint name="MyService2.Debug"
                  contract="Web.DataService.MyService2.IMyService2"
                  address="http://localhost:8732/MyService2"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Debug"
                  />
        <endpoint name="MyService3.Debug"
                  contract="Web.DataService.MyService3.IMyService3"
                  address="http://localhost:8732/MyService3"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Debug"
                  />

        <!-- Local client endpoints -->

        <endpoint name="MyService.Local"
                  contract="Web.DataService.MyService.IMyService" 
                  address="https://www.mydomain.com/MyVirtualDirectory.Local/MyService.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService1.Local"
                  contract="Web.DataService.MyService1.IMyService1" 
                  address="https://www.mydomain.com/MyVirtualDirectory.Local/MyService1.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService2.Local"
                  contract="Web.DataService.MyService2.IMyService2"
                  address="https://www.mydomain.com/MyVirtualDirectory.Local/MyService2.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService3.Local"
                  contract="Web.DataService.MyService3.IMyService3"
                  address="https://www.mydomain.com/MyVirtualDirectory.Local/MyService3.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />

        <!-- Beta client endpoints -->

        <endpoint name="MyService.Beta"
                  contract="Web.DataService.MyService.IMyService"
                  address="https://www.mydomain.com/MyVirtualDirectory.Beta/MyService.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService1.Beta"
                  contract="Web.DataService.MyService1.IMyService1"
                  address="https://www.mydomain.com/MyVirtualDirectory.Beta/MyService1.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService2.Beta"
                  contract="Web.DataService.MyService2.IMyService2"
                  address="https://www.mydomain.com/MyVirtualDirectory.Beta/MyService2.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService3.Beta"
                  contract="Web.DataService.MyService3.IMyService3"
                  address="https://www.mydomain.com/MyVirtualDirectory.Beta/MyService3.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />

        <!-- Live client endpoints -->

        <endpoint name="MyService.Live"
                  contract="Web.DataService.MyService.IMyService"
                  address="https://www.mydomain.com/MyVirtualDirectory/MyService.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService1.Live"
                  contract="Web.DataService.MyService1.IMyService1"
                  address="https://www.mydomain.com/MyVirtualDirectory/MyService1.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService2.Live"
                  contract="Web.DataService.MyService2.IMyService2"
                  address="https://www.mydomain.com/MyVirtualDirectory/MyService2.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
        <endpoint name="MyService3.Live"
                  contract="Web.DataService.MyService3.IMyService3"
                  address="https://www.mydomain.com/MyVirtualDirectory/MyService3.svc"
                  binding="wsHttpBinding"
                  bindingConfiguration="Binding.Secure"
                  />
    </client>
</system.serviceModel>

This is very frustrating!

Edits:

I’ve figured out the exception that I was getting. I had MyService2.Live twice. I fixed this and no longer get the exception. I’d still like to know if I can keep VS10 from changing my App.Config.

  • 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-26T18:11:09+00:00Added an answer on May 26, 2026 at 6:11 pm

    You could use the svcutil tool to generate the files and manually merge them with the ones you have modified.

    p.s: use slsvcutil if your client is Silverlight

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

Sidebar

Related Questions

We currently have an application that starts its own background services to manage syncing
I'm currently at the very early design stage of building a web app that
I am building a Rails app that I manage with Git. All is perfect,
I manage a rather large application (50k+ lines of code) by myself, and it
I manage a website for an organization that has a network where several hundred
I am developing a Spotify App and everything goes very well with a lot
I need to create a simple app which can display geometries from Oracle Spatial
We are building a multiuser app that has one database per customer. All customer
We have a partner that is actually owning our app on it's iTunes Connect
I manage a secured PHP/MySQL web app with extensive jQuery use. Today, a strange

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.