Where is the best location for initial values of windows services?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, friends,

I am creating a (auto start) windows service using c#.net. A few initial
values need to be passed into service. Where is the best location to store
those values (could be changed in future), a .config file, database, or else?

Any reference papers? Thanks a lot.
 
Hello,

that really depends on the type of configuration data and how this data is
deployed. A .config file is fine as you can leverage the configuration
framework of .NET.

And although reading/writing to the registry is not recommended for .NET
application as a configuration source, it may have certain advantages: If
your service is running on several computers in your domain, you could
control those registry settings via group policy.

A database also gives you a centralized method of configuring the service.

Best regards,
Henning Krause
 
Back
Top