By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,070 Members | 1,718 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,070 IT Pros & Developers. It's quick & easy.

Windows Servcice and multiple config files

P: n/a
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
Aug 8 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

--
Dave Sexton

"herbert" <he*****@discussions.microsoft.comwrote in message news:F3**********************************@microsof t.com...
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

Aug 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.