Where to store config information?
- From: James Crosswell <james@xxxxxxxxxxxxxx>
- Date: Fri, 08 Dec 2006 16:34:34 +0100
So it used to be that this info went in ini files... then it was the registry and now it seems that it's gone back to files again with the introduction of .config files to facilitate xcopy deployment.
However, I'm still pretty confused about where everything should go. It seems that with Windows Vista we can't write to directory in which the application is located - so I'm wondering where this stuff should go in various different situations.
For example, I have a NT Service application and a GUI tool to configure that NT Service. The GUI config tool will typically be run by Joe Schmoe and will need to write our various settings to configure the operation of the NT Service, which will likely be running in the security context of the Local System or Network System account. So, if Joe writes settings to one of his user directories then that's not too much use. On the other hand, from what I understand Joe won't have access to write to the program directory either - so where/how should the configuration settings for this NT Service be read/written by the GUI tool that Joe runs, such that they can then be read/used by the NT Service that they're destined for?
In another situation, I have a middle tier application server which will be running under IIS. I'm presuming here that I can use different sections in the web.config file to store application specific data - correct?
And then, in the simplest of all situations, there's the standard Windows Forms app, in which case there are two kinds of config information:
1) Application specific config info -like database connection strings etc.
2) User specific config info - like persistence information for window/dialog positions and options.
I'm wondering which classes in the .NET Framework I'd use to write the former and which I'd use to write the later (and if possible I'd like to track down some sample code for both).
Is there a comprehensive guide somewhere as to where we should be storing dynamic config info in each of the different situations above?
Thanks in advance for any help with this.
Best Regards,
James Crosswell
Microforge.net LLC
http://www.microforge.net
.
- Prev by Date: Caps Lock and Num Lock ?
- Next by Date: Caspol in batfile - How override yes/no question after running caspol
- Previous by thread: Caps Lock and Num Lock ?
- Next by thread: Re: Where to store config information?
- Index(es):
Relevant Pages
|