Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 887093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:10:25+00:00 2026-05-15T13:10:25+00:00

We use the caching and logging application blocks from entlib 4.1. We want to

  • 0

We use the caching and logging application blocks from entlib 4.1. We want to keep the configuration of those two in seperate files. How can we achieve this?

It looks like entlib is always using the selectedSource as it configuration.

I tried the following:

<?xml version="1.0" encoding="utf-8" ?>    
<configuration> 
  <configSections>    
    <section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9057346a2b2dcfc8" />

  </configSections>

  <enterpriseLibrary.ConfigurationSource selectedSource="messagesCache">    
    <sources>    
      <add name="messagesCache" filePath="Configuration\\messagesCache.config"  type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9057346a2b2dcfc8" />    
      <add name="logging" filePath="Configuration\\logging.config"  type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9057346a2b2dcfc8" />    
    </sources>

  </enterpriseLibrary.ConfigurationSource>    
</configuration>

But this doesn’t work because the application blocks always use the selectedSource attribute value.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T13:10:26+00:00Added an answer on May 15, 2026 at 1:10 pm

    As noted in External configuration files in Enterprise Library for .NET Framework 2.0:

    […] while you can configure as many
    Configuration Sources as you want
    using the tool, only one is ‘selected’
    to be the one which Enterprise Library
    will automatically use […]

    What I have done is use the configSource attribute:

    <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="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <section name="validationConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Validation.Configuration.ValidationSettings, Microsoft.Practices.EnterpriseLibrary.Validation, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </configSections>
    
      <loggingConfiguration configSource="logging.config"/>
      <exceptionHandlingConfiguration configSource="exceptionHandling.config"/>
      <dataConfiguration configSource="dataAccess.config"/>
      <validationConfiguration configSource="validation.config"/>
    </configuration>
    

    It works great, but the downside is that if you are editing your application/web config file using the configuration tool and save your configuration it will be saved inside the application/web config file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am implementing caching for my Python application and I want to use memcached.
HI Everybody I wanted to use caching in my application can any one help
I am new to caching. From the docs, I can use caching with queries,
How can I use output caching with a .ashx handler? In this case I'm
I have a class I model bind and I want to use output caching
What caching mechanism should I use for a .Net web application? Memcached seems to
Can someone provide me with an optimized .htaccess configuration that handles compression, browser caching,
I'm trying to use declarative caching from the Spring Modules project. It's not working
I actively use caching in my ASP.NET web site. Though, some objects requested from
I'd love to use page caching on a Rails site I run. The information

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.