[Mono-dev] [PATCH] properly handle <configSections>

Marek Habersack grendello at gmail.com
Tue Nov 28 14:17:18 EST 2006


  The attached diff fixes handling for situations where web.config
contains code like:

<?xml version="1.0" standalone="yes"?>
    <sectionGroup name="system.web">
      <section name="neatUpload" type="Brettle.Web.NeatUpload.ConfigSectionHandler,Brettle.Web.NeatUpload" allowLocation="true" /> 
     <neatUpload useHttpModule="false" maxNormalRequestLength="4096" maxRequestLength="2097151" defaultProvider="FilesystemUploadStorageProvider"> 
           <add name="FilesystemUploadStorageProvider" type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider,Brettle.Web.NeatUpload" tempDirectory="UploadTemp"/>

Current implementation of System.Configuration for the 2.0 runtime will throw an 
exception claiming that the <neatUpload> section is unknown. Configuration code does
read the <configSections> but it mistakenly allocates a new system.web section instead
of merging it with the existing one. The diff causes the sections to be properly merged
and any custom config sections to be recognized. Please, review

best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MergeExistingConfigSections.diff
Type: text/x-patch
Size: 2687 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20061128/46eae9a9/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20061128/46eae9a9/attachment-0001.bin 

More information about the Mono-devel-list mailing list