Hello,
I have implemented a custom config section handler by implementing the
IConfigurationS ectionHandler interface. I have registered this handler
in web.config and everything works fine ... for a while. At random
points in time my section handler stops working and throws the
exception:
Configuration Error
Description: An error occurred during the processing of a configuration
file required to service this request. Please review the specific error
details below and modify your configuration file appropriately.
Parser Error Message:
<exception>
Exception in configuration section handler.
Source Error:
Line 57: <add key="UserFormRe sponse"
value="userform response/UserFormRespons e.aspx" />
Line 58: </appSettings>
Line 59: <logging>
Line 60: <global rethrowExceptio ns="True"></global>
Line 61: <logGroup name="PrimaryLo ggingGroup"
loggingLevel="2 " primaryLoggingG roup="true">
Source File: C:\Webroots\app \web.config Line: 59
------------------------------------------------------------------------
--------
Version Information: Microsoft .NET Framework Version:1.1.432 2.573;
ASP.NET Version:1.1.432 2.573
------------------------------------------------------------------------
--------
</exception>
The really weird thing about this is that the code is running fine
hours at a time and suddenly this occurs.
I have discovered that I am able to get the code running again by
removing the custom section, saving web.config, and reinserting it into
web.config. Weird, huh?
My web.config looks like this
in <configuratio n> I have placed the following which registers my
custom handler:
<configSections >
<section name="logging" type="Vertica.L og.Config, Vertica.Log,
Version=1.0.159 1.19924, Culture=neutral , PublicKeyToken= null" />
</configSections>
I have also tried it in the form of (both produces the same error after
some time)
<configSections >
<section name="logging" type="Vertica.L og.Config, Vertica.Log />
</configSections>
My config section looks like this (also in the <configuratio n> section):
<logging>
<global rethrowExceptio ns="True"></global>
<logGroup name="PrimaryLo ggingGroup" loggingLevel="2 "
primaryLoggingG roup="true">
<logger type="SQL" loggingLevel="1 " connectionStrin g="blablabla"
failoverGroup=" FailoverLogging GroupForPrimary LoggingGroup" />
</logGroup>
<logGroup name="FailoverL oggingGroupForP rimaryLoggingGr oup"
loggingLevel="3 " primaryLoggingG roup="false">
<logger type="EMAIL" loggingLevel="d efault" to="" from="" cc=""
bcc="" />
</logGroup>
</logging>
At this point I really have no clue as to where I should look. Hope
someone can make heads and tails out of this.
--
Med venlig hilsen,
Søren Lund
http://www.publicvoid.dk