D
Dhilip Kumar
Hi All,
I'm writing a Windows Service app using C#. I need to read some
configuration settings before the service starts up. These settings will be
used by the service in its operation. Question is, which is the best way to
store & retrieve the settings? I'm thinking of storing it in the registry
in HKLM\Software\ServiceName and access it using the Registry class in the
"public ServiceName()" method. I'm instructing the service installer to
use "Local Service" account since "Local System" has too many priveleges
which is risky. Would accessing the registry for start-up settings be fine,
or is there any risk associated with doing so? The other alternative is to
use a App.config file I guess. Which one is better? And what are the
possible risks in using the registry from a service?
Thanks,
Dhilip Kumar
I'm writing a Windows Service app using C#. I need to read some
configuration settings before the service starts up. These settings will be
used by the service in its operation. Question is, which is the best way to
store & retrieve the settings? I'm thinking of storing it in the registry
in HKLM\Software\ServiceName and access it using the Registry class in the
"public ServiceName()" method. I'm instructing the service installer to
use "Local Service" account since "Local System" has too many priveleges
which is risky. Would accessing the registry for start-up settings be fine,
or is there any risk associated with doing so? The other alternative is to
use a App.config file I guess. Which one is better? And what are the
possible risks in using the registry from a service?
Thanks,
Dhilip Kumar