Given a web application with the following structure:
Main Site (/)
web.config (root; appSetting="rootSetting")
Applications (/Applications)
App1 (/Applications/App1)
web.config (app1; appSetting="app1Setting")
Inside the application, most of the time I can obtain both the "rootSetting" and the "app1Setting" via WebConfigurationManager.AppSettings[] and WebConfigurationManager.ConnectionStrings[] static indexers.
However, from time to time, it appears that the App1's web.config does not get loaded. When this occurs, I can get "rootSetting" but "app1Setting" returns null.
I am running under Windows Server 2008 R2 / IIS7.5 / ManagedPipelineMode=Classic.