How get web config location element?
ConfigurationManager.GetSection(\"appSettings\") returns Okay
ConfigurationManager.GetSection(\"location\") return null
Does this help?
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ConfigurationLocationCollection myLocationCollection = config.Locations;
foreach (ConfigurationLocation myLocation in myLocationCollection)
{
Console.WriteLine("Location Path: {0}", myLocation.Path);
Configuration myLocationConfiguration = myLocation.OpenConfiguration();
Console.WriteLine("Location Configuration File Path: {0}", myLocationConfiguration.FilePath);
}
Console.WriteLine("Done...");
Console.ReadLine();
Taken from here