The application I want to read settings from writes to the section of the machine.config in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG.
But when I use the following code:
Configuration myMC = WebConfigurationManager.OpenMachineConfiguration();
Console.WriteLine(myMC.FilePath.ToString());
The path returned is always the .NET 4 machine.config:
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
Edit: my app uses MEF, so it requires .NET 4, writing the app from .NET 2 is not an option.