ASP.NET Web.Config ConfigurationManager.AppSettings File Caching

I am using the ConfigurationManager.AppSettings assembly to restore configuration values โ€‹โ€‹from a Web.config file in an ASP.NET application. Does anyone know if the values โ€‹โ€‹in AppSettings will be cached in memory in any way, or if the file read in Web.config occurs every time the setting is received?

string someValue = ConfigurationManager.AppSettings["SomeSetting"];

thank

+5
source share
1 answer

They are taken from memory, since web.config is read only once when the application starts.

However, ASP.NET controls the web.config file to detect and download changes.

, , . , - XML.

, MSDN

:

http://weblogs.asp.net/stevewellens/archive/2011/01/15/web-config-is-cached.aspx

+5

All Articles