Hello All: I have implemented a custom configuration section in my
app.config file as follows:
<configSections >
<section name="AdminUICo nfig"
type="TestMgr.U IConfigSection, TestMgr"/>
</configSections>
<AdminUIConfi g name="Admin" caption="Admini strator"
captionLC="admi nistrator">
<lookupLayout s>
<lookupLayout name="c1" caption="Admini strator" imageIndex="0"
property="FullN ame" />
<lookupLayout name="c2" caption="Email Address"
property="Email Address" />
<lookupLayout name="c3" caption="Insert By" property="Inser tBy" />
<lookupLayout name="c4" caption="Insert Date" property="Inser tDate"
/>
<lookupLayout name="c5" caption="Update By" property="Updat eBy" />
<lookupLayout name="c6" caption="Update Date" property="Updat eDate"
/>
</lookupLayouts>
</AdminUIConfig>
I can read the configuration properties from my custom section without
issue. When I modify one of the properties in this section programmaticall y
and save the configuration file nothing seems to happen? The configuration
remains changed while the application is open but when the application
restarts the changes I saved are not available?
I modify and save a property for my custom section as follows:
Dim c As Configuration
Dim s As UIConfigSection
c =
ConfigurationMa nager.OpenExeCo nfiguration(Con figurationUserL evel.None)
s = c.GetSection("A dminUIConfig")
s.captionLC = "MODIFIED!"
s.SectionInform ation.ForceSave = True
c.Save(Configur ationSaveMode.M odified)
AM I MISSING SOMETHING?
Thank you,
Shannon Richards
BBA, AIT, MCP