Unsolvable problem

  • Thread starter Thread starter =?iso-8859-1?Q?S=F8ren_Lund?=
  • Start date Start date
?

=?iso-8859-1?Q?S=F8ren_Lund?=

Hello,

I am sure that the following problem *is* solvable :) Read on...

I have implemented a custom config section handler by implementing the
IConfigurationSectionHandler 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="UserFormResponse"
value="userformresponse/UserFormResponse.aspx" />
Line 58: </appSettings>
Line 59: <logging>
Line 60: <global rethrowExceptions="True"></global>
Line 61: <logGroup name="PrimaryLoggingGroup"
loggingLevel="2" primaryLoggingGroup="true">

Source File: C:\Webroots\app\web.config Line: 59
------------------------------------------------------------------------
--------
Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET Version:1.1.4322.573
------------------------------------------------------------------------
--------
</exception>

The error is right at the very beginning of my custom section in
web.config. The XML must be well-formed as the handler works most of
the time.

I can get the code running again by touching web.config making ASP.NET
reload the application or by running an iisreset (same thing).

My web.config looks like this

in <configuration> I have placed the following which registers my
custom handler:

<configSections>
<section name="logging" type="Vertica.Log.Config, Vertica.Log,
Version=1.0.1591.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.Log.Config, Vertica.Log />
</configSections>

My config section (where the error is reported) looks like this (also
in the <configuration> section):

<logging>
<logGroup name="PrimaryLoggingGroup" loggingLevel="2"
primaryLoggingGroup="true">
<logger type="SQL" loggingLevel="1" connectionString="blablabla" />
</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.
 
hugo said:
Any antivirus software touching on the web folder ?

There was on the staging environment but not on the live environment
where we experience the same thing - on two different servers
nonetheless.
 
Hi

Can you please try two things:

- change the web.config to

<configSections>
<sectionGroup name="logging">
<section name="logGroup" type="Vertica.Log.Config, Vertica.Log />
</sectionGroup>
</configSections>


<logging>
<logGroup name="PrimaryLoggingGroup" loggingLevel="2"
primaryLoggingGroup="true">
<logger type="SQL" loggingLevel="1" connectionString="blablabla" />
</logGroup>
</logging>

and, of course, make the appropriate change getting the nodes on your
configuration class.


If it doesn't work... i just remember of "logging" name. Can you try another
name ?
hope it helps
 
hugo said:
Hi

Can you please try two things:

- change the web.config to

<configSections>
<sectionGroup name="logging">
<section name="logGroup" type="Vertica.Log.Config, Vertica.Log />
</sectionGroup>
</configSections>


<logging>
<logGroup name="PrimaryLoggingGroup" loggingLevel="2"
primaryLoggingGroup="true">
<logger type="SQL" loggingLevel="1" connectionString="blablabla" />
</logGroup>
</logging>

and, of course, make the appropriate change getting the nodes on your
configuration class.


If it doesn't work... i just remember of "logging" name. Can you try
another name ?
hope it helps

I will try your suggestions out, unfortunately testing the issue is
quite difficult as there is no pattern to the occurence of the config
exception. I will let you know what I find.

Thanks for your help so far, you are the first person to actually
provide some kind of useful tips in this matter. Thank you for that!
 
Hello Soren,

The config code you posted... did you cut and paste it? Because you have a
syntax error in it...
<configSections>
<section name="logging" type="Vertica.Log.Config, Vertica.Log />
</configSections>

You are missing a close quote on the 'type' attribute of the 'section'
element.

It is quite possible that this tag is not being parsed until later in your
code.

Hope this helps,
--- Nick
 
Nick said:
Hello Soren,

The config code you posted... did you cut and paste it? Because you
have a syntax error in it...


You are missing a close quote on the 'type' attribute of the 'section'
element.

It is quite possible that this tag is not being parsed until later in
your code.

I checked my config and the XML is formatted correctly. I believe that
if the problem was a simple case of malformed XML the framework would
yield an error for that particular line instead of some lines below.
 
Back
Top