The Configuration API would be of help here. The WebConfigurationManager Class
from Namespace System.Web.Configuration
Examples:
http://msdn2.microsoft.com/en-us/library/system.web.configuration.webconfigurati
onmanager.aspx
AND
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/management/mgmtapi.aspx
Regards
JIGNESH
> I've got a Winforms app and I'm trying to parse an ASP.Net web.config file
> (xml)
[quoted text clipped - 20 lines]
> What can I use to show me each node, separately in the nodelist?
> Then, how can I add a node in that section?
Elmo Watson - 20 Jan 2008 05:44 GMT
I tried the first link and I can't get it to work. It seems like the IDE
doesn't recognize 'ConnectionStringsSection', and I can't find anything to
replace it with - I've imported System.Web.Configuration - done the
reference - the whole deal
According to MSDN, Web.Configuration.WebConfiguration manager:
Retrieves the specified configuration section from the current Web
application's default configuration file.
This is a Winforms app - -
none of this is recoginzed by my winforms app
This has had me working for hours and it hasn't worked - unless someonce can
give me some specific example code on how to use it, based on my stated
needs, can anyone else help, based on my original post?
> The Configuration API would be of help here. The WebConfigurationManager
> Class
[quoted text clipped - 36 lines]
>> What can I use to show me each node, separately in the nodelist?
>> Then, how can I add a node in that section?
Elmo Watson - 20 Jan 2008 22:28 GMT
Actually, I finally found a way to make the top link here work, but I can't
seem to find a way to pass a directory, so it can get a specific web.config
file to parse.
Anyone know how to add this in with it?
> The Configuration API would be of help here. The WebConfigurationManager
> Class
[quoted text clipped - 36 lines]
>> What can I use to show me each node, separately in the nodelist?
>> Then, how can I add a node in that section?