[Mono-dev] Bug in ConfigurationSection.cs

James Fitzsimons james.fitzsimons at gmail.com
Wed Aug 15 19:34:00 EDT 2007


Hi all,

While trying to get Spring.NET working on mono I've discovered a bug in
the mono implementation of ConfigurationSection. The documentation
(http://msdn2.microsoft.com/en-us/library/system.configuration.iconfigurationsectionhandler.create(VS.71).aspx)
states that the parameters for a call to the Create method on
IConfigurationSectionHandler look like this:

parent
        The configuration settings in a corresponding parent
        configuration section.
configContext
        An HttpConfigurationContext when Create is called from the
        ASP.NET configuration system. Otherwise, this parameter is
        reserved and is a null reference (Nothing in Visual Basic).
section
        The XmlNode that contains the configuration information from the
        configuration file. Provides direct access to the XML contents
        of the configuration section.
        
The problem with the mono implementation of ConfigurationSection is that
it doesn't honour the requirements for the configContext parameter.

The problem is line 73 of ConfigurationSection.cs where the
SectionHandler.Create method is called with a null argument for
configContext regardless of whether it is being executed from with
ASP.NET or not.

I've attached a simple test case that will load a blank page when run on
the MS .NET runtime, but will throw an exception when run on Mono.

Looking forward to a patch (hopefully not too late for 1.2.5)!
Thanks and regards,
James Fitzsimons 
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConfigurationSectionTestCase.zip
Type: application/zip
Size: 16551 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070816/2f07efb9/attachment.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070816/2f07efb9/attachment.bin 


More information about the Mono-devel-list mailing list