Windows Servcice and multiple config files

G

Guest

In VS.2005 a Windows Service can have an app.config file.
A class library can also have an app.config file.

Now if my Windows Services uses three class libraries, each of it coming
with its own app.config file, in which sequence are the app config files read
in?
eg What happens if there are trace switches of the same name with different
values in those files?
Or a the config files local to a VS project/assembly ? If so, they should
not be called app config in VS.2005.

Note: the online help is still on .NET 1.0 saying that config files are
only for Windows / Web / Console applications. There is no hint about class
libs and windows services.

thanks you very much
herbert
 
D

Dave Sexton

Hi Herbert,

Configuration files only apply to executables such as WinForms, Console and Windows Service applications, ASP.NET uses web.config,
and the framework loads machine.config and security configuration files as well.

There won't be any conflicts because the framework will ignore your [classlib].dll.config files.

web.config and [appname].exe.config both inherit settings from machine.config. web.config also inherit settings from any web.config
files present in the hierarchy of parent directories.
 

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