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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:15:06+00:00 2026-05-23T04:15:06+00:00

I have a MyProject.config file that contains ConnectionStrings, AppSettings, and custom sections. I don’t

  • 0

I have a MyProject.config file that contains ConnectionStrings, AppSettings, and custom sections. I don’t want to have to duplicate these settings in the wcf app.config file. Is it possible to merge MyProject.config with app.config or web.config if it is hosted in IIS. If so, where in the code would I do this and how would it be done?

As an example, in MyProject.config, I have a section group called Common and in Common I have AppSettings and ConnectionStrings. I know I can duplicate this in app.config, but then I would have to maintain it in two places.

MyProject.config:

<?xml version="1.0"?>
    <configuration>
        <sectionGroup name="common">
            <section name="appSettings" />
            <section name="connectionStrings" />
        </sectionGroup>
   </configSections>

   <common>
       <appSettings>
           <add key="UserName" value="test" />
           <add key="Password" value="test" />
       </appSettings>
       <connectionstrings></connectionstrings>
  </common>

app.config for wcf contains ServiceModel configuration, I dont’ want to have to put the above in app.config. I want to read it, does this make sense?

  • 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-23T04:15:07+00:00Added an answer on May 23, 2026 at 4:15 am

    WCF will only load the config based settings for a service from the .NET configuration file for an application (web.config for IIS hosted services). Essentially you are fighting the .NET configuration file model.

    If you want to keep the files separate then decide what will act as your primary config file and then use the configSource model for combining multiple config files

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

Sidebar

Related Questions

I have an App.config file in my project that gets copied to NameOfExe.exe.config at
I have a config file at the root directory of my project which contains
In PHP, i would have a config file that says something like $account =
I know that if I want to have requests for MyPage.aspx go to the
In my project we use a config file that's parsed with the configparser module.
Good Day I have a project that makes use of custom assemblies in the
I'm trying to pass -Djava.util.logging.config.file=/path/to/my/logging.properties so that I can configure my loggers using the
I have a config file which lists all the configuration details for Logback.xml like
In my project I have a class that is inherited by many other classes.
For my project I have settings that I added through the Settings in the

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.