469,573 Members | 1,622 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

Help with Config section read/Write as NameValue Pair

Hi, I have this constraint. A help would be greatly appreciated.
I have this Config file.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configsections>
<sectionGroup name="mainsection">
<section name="ConnectionString"
type="System.NamevaluesectionHandler,System" />
</sectiongroup>
</configsections>

<mainsection>
<connectionstring>
<add key="projcode1" value="database"/>
<add key="projcode2" value="database2"/>
</connectionstring>
</mainsection>

I use VB.NET to read this section.
I want to use DPAPI with Machine store. For this I have to read the
connection string from config file as name value pair, Then encrypt the
connection string & want to replace back the encrypted string into the
same section of config file.
I have an issue in writing Namevalue pair into the same section. Could
somebody please help me with writing as name value pair, as an attribute
into the section.
I used configuration management application block from microsoft to
write. But then I was unable to write namevaluepair as an attribute to a
element in a node.

A help would be greatly apprecitaed.
Thanking you
Shaun
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
0 1448

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Shaun Ram | last post: by
reply views Thread by Shaun Ram | last post: by
2 posts views Thread by fabrice | last post: by
1 post views Thread by Rahul | last post: by
6 posts views Thread by naknak | last post: by
3 posts views Thread by noagbodjivictor | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.