EntLib Configuration Tools and External files

Topics: General discussion
Jul 8, 2009 at 9:54 AM
Edited Jul 8, 2009 at 9:55 AM

The EntLib Configuration Tools is awsome
However, I have an issue when I try to maintain maintain separate files for each block

<configuration>
<configSections>
   <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
   <section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
<configSections>

 <!-- Enterprise Library Sections -->
<loggingConfiguration configSource=".\ConfigFiles\logging.config" />
<cachingConfiguration configSource=".\ConfigFiles\caching.config"/>

I don't know what I am missing
or simply the configuration tool does not work with separate files from the web.config
In this case, it is really pitty
Tanks for your help

Jul 8, 2009 at 10:22 AM

Hi,

Are you refering to the scenario that when you save the changes to a reference config files that it dumps all the changes back to the main config file? If it is, you might want to check this link http://blogs.msdn.com/tomholl/archive/2006/04/02/entlib2externalconfig.aspx. This explains about that behaviour.

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Jul 8, 2009 at 10:44 AM
Edited Jul 8, 2009 at 10:53 AM

Thank you so much for this very very quick answer
The link you provided seems exactly what I am looking for
Reading further, I however did find a solution to my problem

I already managed ot have separated files working in my application

What annoys me is when I open the configuration tool it does not read/write to my separeted files but to my web.config

I am quite sure I am missing something

Thanks again

Jul 8, 2009 at 3:09 PM

That is an expected behavior because the configuration tool doesn't understand the configSource attribute.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Jul 8, 2009 at 4:30 PM

Thanks Sarah
Any chance to have this fixed in the next version?

Jul 8, 2009 at 4:34 PM

I'm not sure, but you can vote for it, there's a link in the home page.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com