Jul 16, 2008 at 4:59 PM
Edited Jul 16, 2008 at 5:15 PM
i have a web application that uses different configsections in the web.config file. I have in different files the Exception Handling, Logging policies and 2 custom configuration sections i use to read data depending the day of the week.
Problem is that when i try to create a Tracer to write info in any log, i get an error message saying:
"The configuration could not be found for name 'CustomConfiguration' in factory ConfigurationSourceFactory."
CustomConfiguration is one of my custom sections. Thing is this is a migrated application from EntLib 1.1 to 3.1 and dont know what could be causing the problem.
I have tried to look for the error message and reading the documentation but i still dont get it.
Could you please help me with this? I could paste here the logging and exceptionhandling secionts but i dont feel like it cause they are a bit extensive. If u want to see any code just tell me and i will paste it here.
EDIT: Basically the tracer ends in ConfigurationSectionFactory.cs in this code
/// Creates a new configuration sources based on the default configuration information from the
/// application's default configuration file.
<returns>The new configuration source instance described as the default in the configuration file,
/// or a new instance of
<see cref="SystemConfigurationSource"/> if the is no configuration sources configuration.</returns>
<exception cref="ConfigurationSourceSection">when there is a configuration section but it does not define
/// a default configurtion source, or when the configuration for the defined default configuration source is not found.</exception>
static IConfigurationSource Create()
= ConfigurationSourceSection.GetConfigurationSourceSection(); <-----
This is return my CustomConfiguration Section
if (configurationSourceSection !=
string systemSourceName = configurationSourceSection.SelectedSource;
<---- Here is when it does not find the CustomConfiguration name and raises the exception
I have seen this thread too that has some similarities with my problem (Other Thread) . Just to say i have no problems with my .config file since its read by the application
and recognizes my CustomConfiguration Section