VB 2010 - create custom section in app.config

Hi,

I use app.config file for storing config values for my VB 2000 Widows Forms application. Iknow, how to use <appSettings> and store keys in it.

<appSettings>
        <add key="myExampleValue1" value="123" />
        <add key="myExampleValue1" value="abc" />
</appSettings>

Open in new window


I would like to programmatically create the same section with my custom name and use it in the same way like section <appSettings>

For example:

<mySection>
        <add key="myExampleValue3" value="1234" />
        <add key="myExampleValue4" value="abcd" />
</mySection>

Open in new window


The reason is, that I would like to encrypt <mySection> similar like I have the section <connectionStrings> encrypted.

 <connectionStrings configProtectionProvider="DataProtectionConfigurationProvider">
     <EncryptedData>
         <CipherData>
             <CipherValue>
             ...
             </CipherValue>
         </CipherData>
    </EncryptedData>
</connectionStrings>

Open in new window


How is it possible to create <mySection>?

Thanks
skdanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
skdanAuthor Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.