[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

ConfigurationElementCollection does not save correclty

John Bailey

5/9/2008 4:45:00 PM

I have a configuration that is defined as such:

<sampleSection defaultItem="name" xmlns="http://www.baileysc.com/sample...
<sampleItems>
<sampleItem itemName="name" customData="xxx" />
<sampleItem itemName="name2" customData="xxx2" />
</sampleItems>
</sampleSection>

I have created classes to read/write the configuration section by deriving
from ConfigurationSection, ConfigurationElement and
ConfigurationElementCollection. The code reads the configuration perfectly,
but when writing the configuration it writes:

<sampleSection defaultItem="name" xmlns="http://www.baileysc.com/sample...
<sampleItems itemName="name" customData="xxx"
itemName="name2" customData="xxx2" />
</encryptionSection>

Does anyone have an idea of what could be going wrong here?


1 Answer

James

5/30/2008 8:53:00 PM

0

On May 9, 11:45 am, John Bailey <JohnBai...@discussions.microsoft.com>
wrote:
> I have a configuration that is defined as such:
>
>   <sampleSection defaultItem="name" xmlns="http://www.baileysc.com/sample...
>     <sampleItems>
>       <sampleItem itemName="name" customData="xxx" />
>       <sampleItem itemName="name2" customData="xxx2" />
>     </sampleItems>
>   </sampleSection>
>
> I have created classes to read/write the configuration section by deriving
> from ConfigurationSection, ConfigurationElement and
> ConfigurationElementCollection.  The code reads the configuration perfectly,
> but when writing the configuration it writes:
>
>     <sampleSection defaultItem="name" xmlns="http://www.baileysc.com/sample...
>         <sampleItems itemName="name" customData="xxx"
> itemName="name2" customData="xxx2" />
>     </encryptionSection>
>
> Does anyone have an idea of what could be going wrong here?

Did you ever figure out what was causing the described behavior? I'm
having a similar issue.

Thanks,

James