472,353 Members | 1,183 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Write Namevalue pair into Config file

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

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

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

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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
0 843

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Shaun Ram | last post by:
Hi I have this constraint. A help would be greatly apprecitated. I have this Config file. <?xml version="1.0" encoding="utf-8" ?>...
by: ALI-R | last post by:
I have tree variable with their values: 1) rptName="report1" 2) rptPath="c:\......" 3) serverPath=http://server... and 4)an arry which contain...
by: ALI-R | last post by:
Hi,, I have two questions : 1) Is it mandatory that config file of a desktop application must be App.config 2) Is it possible to update...
by: Charles | last post by:
I'm reading some stuff in a custom section of the web.config file into a name value collection. What do I need to do to make this work: Dim...
by: Shaun Ram | last post by:
Hi, I have this constraint. A help would be greatly appreciated. I have this Config file. <?xml version="1.0" encoding="utf-8" ?>...
by: feng | last post by:
..Net's .config file is supposed to replace the .ini files. That's all fine if all I need is to read from it. But what if I need both read and...
by: Agnes | last post by:
Can I write a file like config.ini which store the server-name, userid & password, So, my application can read the config.ini file and get the...
by: lkrich7 | last post by:
hello, I wrote the following definition: typedef vector< pair<char, TrieNode* TrieNode; but it can't be compiled, because "TrieNode" is not...
by: valdas | last post by:
Hi, I have a problem in accessing "sqlServerCatalogNameOverwrites" section in app.config file. <configuration> <configSections> ...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.