Take the 2-minute tour ×

I have .net 4.0 silverlight project and I save many application and/or user specific configurations in external xml files. By application specific configurations means project name, urls, specific UI configurations, etc. As my application grew so the number of these xml configuration files and content inside each xml files. So my question is: Is there any alternative in .net to store these kinds of values else where? Previously I had all these values in database tables, so that option is not there. I am looking for a way of some different kind of repository or some way to modularize my growing xmls. Thanks.

share|improve this question
If database tables are not an option, would simpler key-value stores be ok? –  Filip Jun 9 '12 at 16:25
Based on what you've said I fail to see how an other storage mechanism is going to solve the underlying issue, i.e. too many config files in play. –  Tony Hopkinson Jun 9 '12 at 16:28
@Filip: thanks for comment. By key-value stores you mean storing config values when application is running? but I will have to retrieve those values from somewhere i.e. xml or db. and I will have to make that key-value list may be static which is not preferable. –  Mayank Jun 9 '12 at 16:34
It would be useful to know why Xml is not suitable or less desirable. As Tony said above, any alternative would still need to cover the same amount of settings, data. So you'd still lots of config settings to manage. –  jussinen Jun 9 '12 at 16:35
@TonyHopkinson: yes I know... but as these xml files get larger, its very difficult for user to configure application and for developer also its tough to maintain the file. I can divide into multiple xml files but then will have to keep track of what configuration goes in which xml file. –  Mayank Jun 9 '12 at 16:37

2 Answers 2

up vote 1 down vote accepted

Sounds to me like your problem isnt the actual format of the data, its the configuration management process that is getting more demanding. You might wanna think about implementing a simple management tool to help you (or other people) manage your configuration data, and then the choice of data format is secondary.

In my current company, configuration management evolved quite naturally. First we put most of our configuration in a configuration table in our database. Then we changed it and put it in XMLs and we put those XMLs in our database. Then we refactored those XMLs to a canonical format and implemented a GUI tool that edits them so that a monkey can do the configuration. Its certainly not perfect, but we are pretty satisfied.

share|improve this answer
yeah. you are abs right. I am on same track as you were... and I think some kind of management tool is the answer. Thanks for your input. –  Mayank Jun 9 '12 at 16:54

You could always use JSON stored in text files, which is light-weight compared to Xml and still clear and understandable, and can be easily serialized and de-serialized to C# objects.

share|improve this answer

Your Answer


