It loads the first time ConfigurationSettings.AppSettings is called,
not necessarily on application load.
Hard to test in an ASP.NET app but in a winform/console app it's easy
to verify because you can change the app.config file before calling
ConfigurationSettings.AppSettings and your changes are reflect (not
usually a good idea but we did this in one situation where we wanted a
console app to share a config file with another app sothe console app
copied the file on startup).
Sam
------------------------------------------------------------
We're hiring! B-Line Medical is seeking Mid/Sr. .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.
On Thu, 11 Jan 2007 15:16:47 -0500, "Ignacio Machin \( .NET/ C# MVP
\)" <machin TA laceupsolutions.com> wrote:
>| string blah = ConfigurationSettings.AppSettings["foo"]
>|
>Not much, only a lookup in some struct in memory ( hashtable, etc). At some
>moment the file needs to be loaded. IMO (but I have no fact to prove it) it
>happens when the application loads.
>
>Also remember that even as the file remains closed the engine keeps an eye
>on it (probably using a FileSystemWatcher) to detect change, if it does it
>reload the entire app
|