You can use
AppDomain.CurrentDomain.SetupInformation.ConfigurationFile
to determine which app.config file is being used by ConfigurationManager.
Note that if you are writing a service then the service uses its own app.config file and not the one of the program calling it. This can lead to confusion when developing services in Visual Studio using a test driven development methodology as the app.config in the test project is not the one used by the service being tested.
You must log in to post a comment.