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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:15:55+00:00 2026-05-18T22:15:55+00:00

We have lot of application parameters for each module in a C# .NET 4

  • 0

We have lot of application parameters for each module in a C# .NET 4 ASP website.

parameter examples: timeouts, formulae constants, thread limits per module, $ charges per usage etc.

What is best out of following approaches we know:

  1. Use DB config table
  2. Use an xml. load that xml into local cache on start (and on xml change)
  3. simple constants.cs file with public const int XYZ = 123; type of key-value pairs.
  4. web.config (though i think its mostly for deployment type of config)
  5. Any other way ?

Help on pros and cons and std. approach followed would be helpful.

  • 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-18T22:15:56+00:00Added an answer on May 18, 2026 at 10:15 pm

    I like #1, storing the values in the database, for several reasons:

    1. This works on a web farm. You don’t have to synchronize versions of web.config on multiple servers.
    2. Making changes does not require recompiling and redeploying the application. Changes can be immediate.
    3. It is relatively easy to create a maintenance web page for authorized users to update the values without bugging production support.
    4. The values can be determined at any time from outside the application by anybody given access to the database (or to a maintenance page displaying the values). Nobody has to read through the source code or look at web.config files.
    5. The web application does not have to be restarted for the change to take effect.

    Edit: Additional comments about the other proposed methods:
    If the app is going to be on a web farm, all three non-database choices will require deployment to all servers. This is not a trivial matter if a lot of web servers are involved, if the deployment procedure is complicated, or if corporate policy severely limits who (and when) changes can be deployed to production servers.

    Even when there is no web farm, in a corporate production environment, it can be excruciatingly slow to deploy a change.

    Regarding constants, I have found that they tend to get sprinkled all over the application code. Finding them can be a real challenge. Of course, if you have the discipline to centralize the configuration constants, you won’t have this problem.

    There is one other approach not on your list, which is using resource files (.resx). While this is generally used for localization, I have seen it used for configuration values, and especially for storing the text of standard messages. While you don’t have to recompile your application to alter a .resx file, changing it will cause the application to restart.

    In summary, then, my reasons for preferring the database approach are the speed and ease of deployment, avoiding recompilations and app restarts, centralizing the data outside the application, and making the data accessible to business users.

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

Sidebar

Related Questions

We have a pretty big ASP.NET WebForm (web application) project with a lot of
I have an application that is causing a lot of headaches. It's a .NET
I have an application which spawns a lot of child objects and each of
We have an application containing a lot of user controls that update frequently based
I have a server application that uses a lot of threads. Without wanting to
I have a console application that contains quite a lot of threads. There are
i have a winforms application. i have a user control with a lot of
We currently have a quite complex business application that contains a huge lot of
Our application is interfacing with a lot of web services these days. We have
The ASP.NET web application I am developing needs to support two different types of

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.