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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:30:53+00:00 2026-05-16T06:30:53+00:00

When we deploy applications, there is usually a separate machine for production and development.

  • 0

When we deploy applications, there is usually a separate machine for production and development. Most of the applications have settings in a regular .NET App.config or Web.config file. For example:

<add key="Dev_Setting1" value="val1"/>
<add key="Prod_Setting1" value="val2"/>

<add key="Prod_Setting1" value="val3"/>
<add key="Prod_Setting2" value="val4"/>

We’d like to have the applications choose automatically between two sets of settings, depending on the machine. Is there a standard way of doing this? Other suggestions welcome.

  • 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-16T06:30:54+00:00Added an answer on May 16, 2026 at 6:30 am

    How about the following approach?

    Having the machine name in one of the settings would allow you to determine which prefix needs to be used to load up the application settings – so long as you avoid loading through the standard API and instead implement your own ‘get me a setting value’ you can lookup the setting prefix from the machine name and then look up the relevant setting.

    <add key="MachineConfigPrefix_MyMachine1" value="Prod"/>
    <add key="MachineConfigPrefix_MyMachine2" value="Dev"/>
    
    <add key="Prod_Setting1" value="val3"/>
    <add key="Prod_Setting2" value="val4"/>
    
    <add key="Dev_Setting1" value="val5"/>
    <add key="Dev_Setting2" value="val6"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to deploy a C# application on a 64 bit machine though there
We use jBoss in our development environment to deploy to. There are many applications
I have two separate web applications named MainWeb and Reports. I want to deploy
Would it be possible to build and deploy Meteor applications on Google App Engine
When I deploy applications to our BizTalk server, we deploy to a test machine,
I know there are several ways to deploy a .net windows client application: There's
We deploy our .NET applications by putting them on the LAN, and allowing users
I want to develop and deploy application on iPhone and Android. However there is
Is there a way to set up an appengine web application to deploy on
How Do I deploy applications so that they require administrator rights without the end-user

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.