IConfigurationSource.GetSection not being invoked

Topics: Building and extending application blocks, Logging Application Block
Apr 25, 2011 at 9:57 PM
Edited Apr 25, 2011 at 10:14 PM


I have presently implemented and extended the source code from sql-configuration-source-for-enterprise-library. Our solution consists of a WPF client application and WCF services layers that provides data to the WPF application.

The extended logging API (that gets its logging configuration from the database) works well within the WPF application, however I have noticed that it does not work within the WCF application.

The WCF is using net.tcp channel stack and WAS (windows activation service).

Its appears that the  IConfigurationSource.GetSection() method is not being fired within the WCF application. As this ties into the NET Configuration Manager framework and I am not calling the method directly but relying on .NET to call it.

Both WPF and WCF application have the same .config file entry (as shown below)

    <section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<enterpriseLibrary.ConfigurationSource selectedSource="Test.Configuration.Source">
<add name="Test.Configuration.Source" type="XXX.ConfigurationSource, XXX, Version=, Culture=neutral, PublicKeyToken=null" shouldMonitorDatabase="false" pollTimeoutSeconds="60" />

Am i missing something within the IIS application that is preventing the GetSection() from being called?



Apr 26, 2011 at 3:34 PM


We're not yet able to look into this today. We'll look into this and keep you updated.

Gino Terrado
Global Technologies and Solutions
Avanade, Inc.

Apr 27, 2011 at 3:30 PM

I was able to reproduce your scenario, I can’t make it to work with WCF either. Unfortunately this does really seem to look like a bug in the SQLConfigurationSource. Feel free to log this in the Issue Tracker and vote on it to let the Entlib team know about this.

Gino Terrado
Global Technologies and Solutions
Avanade, Inc.