What is the best practice
- use app.config
- use .ini file
- use Registry
- write a Windows Application program and save the settings to database
table
should I trust the end user to modify registry, .config or .ini file?
app.config, posssibly with a Windows Application to modify the app.config.
David
Whatever be the option, you will anyway need a app interface for the user to
maintain these parameters.
--
Rgds,
Anand
VB.NET MVP
http://www.dotnetindia.com
Then they'll need a program to help them do it.
> What is the best practice
> - use app.config
Not considered "writeable" in .Net applications (at least as far as
VS'2003).
> - use .ini file
Or an XML configuration file that you can interrogate using XPath.
> - use Registry
Not really recommended anymore - the stupid clogged with too much other
rubbish, it's impossible to back-up reliably and is often protected from
casual (i.e. user) perusal.
> - write a Windows Application program and save the settings to database
> table
[Big!] Yes to having an editing application.
Where the data gets stored depends on lots of things. For example, will
the user be on the same machine as the Service? If not, most file-based
solutions (including the Registry, which is just a file) go straight out
the window.
> should I trust the end user to modify registry, .config or .ini file?
No, definitely not. Indeed, most of them (in commercial organisations)
will be actively prevented from hacking around the Registry.
HTH,
Phill W.
I have the Windows Application restart the service so that it sees the
updated config file.
Currently I am using System.Xml to update the config file, however I'm
thinking the new Configuration namespace in .NET 2.0 (VS 2005) will simplify
changing the config file.
FWIW: The new Configuration namespace in .NET 2.0 definitely simplifies
leveraging the config file!
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
.NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"tshad" <tschei...@ftsolutions.com> wrote in message
news:eQuJp%239uGH...@TK2MSFTNGP04.phx.gbl...