AI OnAI Off
version does not work very well for EPiServer sites. This is a pity, as this could have been a smart way of having local overrides of settings. The beauty of this feature is that the settings in the mydevappsettings.config will take precedense over the ones in web.config. So, I could have default (production?) settings in web.config, but my own local overrides in my file (not necessarily under source control).
I did some quick tests, and this is what I found with this setting in web.config:
I also added a key to web.config and appsettings.config:
web.config:
appsettings.config:
From code I did some tests:
System.Web.Configuration.WebConfigurationManager.AppSettings["MySetting"]
--> "appsettings.config"
Global.EPConfig["MySetting"]
--> "web.config"
ConfigurationSettings.AppSettings["MySetting"]
--> "appsettings.config"
So, for your own code, you can use this feature, as long as you do not use the ApplicationConfiguration class in EPiServer (Global.EPConfig and PageBase.Configuration).
Unfortunatly, EPiServer uses its own reader to get the values from web.config (the web.config file is read and parsed as a ordinary xml file), which is why this does not work with the EPiServer settings. I know that the config system in EPiServer is getting an overhaul in 5.0, but I don't know if the file attribute on the appSettings element or the configSource attribute on all config sections will be supported. Hope so :-)
/Steve
). However it does not. If anybody has any suggestions I would greatly appreciate it. Thanks in advance! Pontus