0

I have multiple application on same server [Websites,API's etc]. For these I have used app.config/web.config files respectively. But managing these files required manual intervention which is quite risky due to their syntax.

I have suggested to use database to store config , but I think it will be expensive calls,as server will hit for numerous requests.

Can I use system variables to achieve this? Please suggest better way to accomplish this.

bakshay
  • 43
  • 5

2 Answers2

1

Certainly database call is costly, instead of that place a centralized config file that can be reached by all projects. I am doing the same in my project like more than 50 projetcs(Windows Service, Windows Forms, Web Service, WebSite, MVC app) all referring a single config.

refer this Common app config for multiple applications It may help you

Community
  • 1
  • 1
  • Suggestion is good but issues with maintenance.Common config file for multiple application will increase number of appsettings pairs n too conflicts , like due to manual changes key with name DefaultLanguageCode also can be added as Defaultlanguage with same value,which is duplicate. – bakshay Mar 08 '17 at 07:08
  • I am using the following 00:00:30 00:00:60 – Manikandan Sekar Mar 08 '17 at 07:17
  • Can I use system variables to achieve this? – bakshay Mar 10 '17 at 05:44
0

You can use separate XML files to store settings , These files can be stored in project directory or either in a centralized repository. XML manipulation is so easy and server overhead is also very low .
Setting can be stored in XML files as key val

Saurabh
  • 1,505
  • 6
  • 20
  • 37