Yes, but not in the traditional manner. Let me explain.
App.config files are used to configure an app domain. To put this in simpler
terms, this means that the app that controls all of the libraries will be the
config in effect. If you attempt to pull configuration from a library under
control of an app, it will read that config file and not the one for your
library.
To get around this, you have a couple of options.
1. Dump a "config" (XML?) file in the application directory that the class
library can read. This is a bit kludgy, as the class library is breaking from
normal convention.
2. Move to SOA. This means wrapping the class library in a service (windows
or web (note that "web service", to me, is either ASMX or Remoting)). The
service then, technically, has the class library's "config". This option fits
well with Microsoft's vision.
3. Create a "config" service that the class library can contact. This is not
pure SOA and thus not as recommended, but it is certainly better than option
1.
Ultimately, if you want two configs, you should have two applications. The
SOA concept in .NET 2.0 (which can be used in 1.x) is a good option, as it
will continue to gain MS support (as well as industry support). The downside
is you need to change you thinking towards messaging to make this option
really viable.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************