external configuration file for enterprise library

If i use an external configuration file for Microsoft enterprise library for my program, then all the configuration for enterprise library must reside in the external configuration file? can i still have part of the configuration in the hosting configuration file?


If I understand you correctly you want to configure Entlib in an external file, and override some settings on your app.config?

If that's the case, check the EntLib Hands-On Labs. Particularly take a look at the configuration HOL; it shows you how to inherit configuration from a shared location, and override it.

I am using Enterprise Library 5.0

I needed to reference my enterprise library config outside the app.config.

I used the following with my own logging factory:

var configSource = new FileConfigurationSource("EntiLib.config");
var logWriterFactory = new LogWriterFactory(configSource);
var logWriter = logWriterFactory.Create();

I was able to find this solution on CodePlex answer on code plex

Good links by Nicolas and Peter. Glad you found the hands-on labs useful. In addition, please take a look at this chapter that we wrote to explain various configuration scenarios, including:

  • reading configuration information from a wide range of sources.
  • enforcing common configuration settings across multiple applications.
  • sharing configuration settings between applications.
  • specifying a core set of configuration settings that applications can inherit.
  • merging configuration settings that are stored in a shared location.
  • creating different configurations for different deployment environments.


 ? Any way to gracefully enforce a timeout limit when loading a slow external file via javascript?
 ? iFrame and Javascript to parent document
 ? Loading JS dynamically from another JS (jQuery)
 ? Add programming language to gedit external tools?
 ? How to change to an external disk drive in C
 ? What does % mean in an OCaml external declaration?
 ? External program blocks when run by Runtime exec
 ? iphone: cross platform references and referencing external framework resources
 ? External CSS for JSF
 ? RSpec setup for an application that depends on an external database from another application