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?
Don't mulitpost.
From you list only 2 different approach available - file or DB. What to use
is up to u and depends on you project
Some explanations
app.config is a native solution for the .net xml world
registry is too specific storage to the local user/machine
t> I need to pass a few parameters to my Windows Service program. The
t> end user will be changing the parameters and settings should be
t> saved.
t>
t> What is the best practice
t> - use app.config
t> - use .ini file
t> - use Registry
t> - write a Windows Application program and save the settings to
t> database
t> table
t> should I trust the end user to modify registry, .config or .ini file?
t>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
"tshad" <tschei...@ftsolutions.com> wrote in message
news:uftvs%239uGH...@TK2MSFTNGP02.phx.gbl...
>I need to pass a few parameters to my Windows Service program. The end user
>will be changing the parameters and settings should be saved.
A windows service with end user interaction?
> What is the best practice
> - use app.config
Read only
> - use .ini file
Possible, I prefer this option
> - use Registry
Possible
> - write a Windows Application program and save the settings to database
> table
You will have to, a window service has not user interaction. You should
write a win app to allow configuration changes.
If you use a file you could use a FileSystemWatcher to detect changes in the
config file and reload the configurations.
> should I trust the end user to modify registry, .config or .ini file?
Never instruct an end user to change the registry !!!
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Actually, this was also for non-service non-web applications. But I want to
be able to allow my boss to make changes to the fields - such as email
addresses or Web sites to monitor. Then when he restarts the Windows
service, it would pick up the changes. I don't want him to have to go to
the file on the server to make the changes.
>
>> What is the best practice
>> - use app.config
> Read only
>
>> - use .ini file
> Possible, I prefer this option
I liked this one also. Easy to modify.
>
>> - use Registry
> Possible
>
>> - write a Windows Application program and save the settings to database
>> table
>
> You will have to, a window service has not user interaction. You should
> write a win app to allow configuration changes.
> If you use a file you could use a FileSystemWatcher to detect changes in
> the config file and reload the configurations.
>
>
>> should I trust the end user to modify registry, .config or .ini file?
>
> Never instruct an end user to change the registry !!!
>
You're right, of course.
Thanks,
Tom