473,379 Members | 1,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Custom Configuration management for app.Config

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
Shaun
Nov 12 '05 #1
1 3206
Have you seen this article, entitled "The last configuration section handler
I will ever need" ??

http://staff.develop.com/candera/web...andler%20I.xml

-D

"Shaun" <tr************@yahoo.com> wrote in message
news:45**************************@posting.google.c om...
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
Shaun

Nov 12 '05 #2

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

Similar topics

0
by: Shaun | last post by:
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...
7
by: Ken Allen | last post by:
I have a .net client/server application using remoting, and I cannot get the custom exception class to pass from the server to the client. The custom exception is derived from ApplicationException...
3
by: Damian | last post by:
Hi everyone I'm having an issue with one of our applications. I'm getting the following error when attempting to log in to the site: Server Error in 'xxxxxxxxxxxxxxxx' Application....
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
5
by: Graham | last post by:
I have created a custom MembershipProvider called "LassieMembershipProvider" that derives from "MembershipProvider". This providor is located in a Businesslogic layer dll called...
6
by: Tabi | last post by:
Hi, I want to create a custom section in my web.config that can hold my custom values. I created a section in web.config as written below. <configSections> <section name="myCustomSection"...
3
by: Jason Richmeier | last post by:
Is it possible to create a custom configuration file (other than app.config) that can be processed by classes in the System.Configuration namespace? I have seen a ton of articles that talk about...
1
by: Ryan | last post by:
I am trying to log events to SQL Server instead of the computers event log, but, although I get no errors, I have no luck. The webevents_events table is empty. I have a custom event that I am...
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.