I have an existing web site that uses the AppSettings in the web.config file to hold networkIDs of users that hold certain positions. The users are then references from code through the ConfigurationManager.AppSettings collection. My manager doesnt want me to keep these values in the web.config file. She proposed that I keep them in a table and then read the values when needed. What I would like to do is read the values once from the database and write the values to the AppSettings in the web.config file. Then I wouldnt have to change any of the code because it is being referenced everywhere. Does this seem like a good approach and how do I write to the web.config file in the AppSettings..
Example of web.config file with a couple of the AppSettings that I want to write
<location allowOverride="true" inheritInChildApplications="true">
<add key="BusMgr" value="CISSABC"/>
<add key="RailMgr" value="CISSDEF"/>
<add key="FinMgr" value="CISSGHI"/>
<add key="SpecMgr" value="CISSJKL"/>
As I said if I can write these values then I wont have to change any of the code that references the AppSettings.
Please help me if you can. I would appreciate it