Windows Service and app.config

B

Bill

I've created a windows service in C#, but I'm having trouble reading
<appSettings> from a app.config file.

I can read <appSettings> just fine from a normal C# windows app, so there
must be some trick to read this file from a windows service, yes? perhaps
the location of the .config file?

any help is appreciated...
-bill
 
S

S. Han

I don't think app.config is designed to work with a dll (or a service).
You can store the configuration in an Xml (you'll do the parsing)
or in the registry.
 
N

Nal

App.config works just fine with Windows Services, there is no need for a
custom xml file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top