FileConfigurationSource and .Net configuration section

Topics: Enterprise Library Core, General discussion
Oct 16, 2009 at 10:07 PM


Is it possible to read/write a .NET configuration section ( <System.Web>, <system.serviceModel>) from a second config file using the EntLib FileConfigurationSource?

If yes, is the .Net framework will be able to use the FileConfiguraitonSource to read the .Net Section at run time when my application starts?

I do not figure how to do this?




Oct 19, 2009 at 4:59 AM


It is not possible thru the FileConfigurationSource, as far as understand the <System.Web> <system.serviceModel> are sectionGroup(Which the FileConfigurationSource cannot handle) and not config section(which the FileConfigurationSource do handle). In this case I think you will need to use the standard .NET way of reading those sections, you can find one here:

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.



Oct 19, 2009 at 5:42 PM
Edited Oct 19, 2009 at 5:44 PM

You are right, but it’s not really what I’m looking for. 

I was looking for a way to store some configuration section of the <System.Web> and then <system.serviceModel> somewhere else, maybe in a second configuration file using FileConfigurationSource or in a database using a custom ConfigurationSource (like SqlConfigurationSource).  All this to have centralised configuration but not juste for the EntLib configuration section.


I found a different approach using a custom ProtectedConfigurationProvider. See:

Thank you,


Oct 20, 2009 at 3:34 AM
Edited Oct 20, 2009 at 3:42 AM

Hi, you can also check this out -


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.