Is there a performance hit when placing your DB connection strings in the machine.config instead of in your application's web.config or app.config?
I feel it should be a negative hit on performance, but surely it should be negligible.
Is there a performance hit when placing your DB connection strings in the machine.config instead of in your application's web.config or app.config?
I feel it should be a negative hit on performance, but surely it should be negligible.
The question is rather a non-question.
The machine.config always gets loaded, the app.config (or web.config) when it exists. Given both files are to be loaded, the difference is non-existent.
If you don't have an application configuration, the system can skip the loading of that file - but that difference will obviously be negligible.
Looking at the MSDN Documentation it would appear that if there is anything to lose or gain performance wise it would most like gain. Although I doubt it would be noticeable.
The configuration system first looks in the machine configuration file for the appSettings Element (General Settings Schema) and other configuration sections that a developer might define. It then looks in the application configuration file.