Groups | Blog | Home
all groups > dotnet xml > may 2004 >

dotnet xml : Custom Configuration management for app.Config


tronicsolution NO[at]SPAM yahoo.com
5/25/2004 2:24:19 PM
Hi,
I created a custom Section handler using System.configuration for Web
application to read from Web.Config File.

If I want to use the same handler to read from app.config file:
app.config is not interpreted as XML file, & the code breaks.

Here is the sample of the logic.

For Each node In section.ChildNodes
For Each element In node.ChildNodes
elementKey = element.GetAttribute("key")
elementValue = element.GetAttribute("value")
Next
Next

Kindly let me know how to use the same custom handler to read from
web.config as well as app.config file.

Thanking you
Dino Chiesa [Microsoft]
5/26/2004 1:30:47 AM
Have you seen this article, entitled "The last configuration section handler
I will ever need" ??

http://staff.develop.com/candera/weblog2/articleview.aspx/CLR%20Workings/The%20Last%20Configuration%20Section%20Handler%20I.xml

-D

[quoted text, click to view]

AddThis Social Bookmark Button