Does anyone know how i can get the configSource value using standard API?
<appSettings configSource="AppSettings.config" />
Or do i need to parse the web.config in XML to get the value?
Does anyone know how i can get the configSource value using standard API?
<appSettings configSource="AppSettings.config" />
Or do i need to parse the web.config in XML to get the value?
Couldn't get the API to correctly load the AppSettings section correctly using the suggestions from @dbugger and @competent_tech.
Eventually went the XML route in just as many lines of code:
Thanks to all for the pointers.
You can use:
And retrieve the value:
don't forget:
Try
you need to add :
using System.Configuration;
namespace in your codeNeed to use the config manager as @competent_tech mentioned.
You need to load the AppSettingsSection, then access its ElementInformation.Source property.
The link above contains information about how to access this section.