I am designing an ASP.NET MVC4 Web App project. In the root of my project, I have the customary default Web.config
file with my corresponding elements. In parti
Figured it out! To use a different config file, incorporate WebConfigurationmanager
. So, to access the appSettings of ./Areas/PackageName/Web.config
, simply use:
var config = WebConfigurationManager.OpenWebConfiguration("~/Areas/PackageName");
string dirE = config.AppSettings.Settings["dirEnabled"].Value;
Try with
<appSettings file="<Path_To_Second_Web.Config>">
...
</appSettings >
in your project's Web.config
http://msdn.microsoft.com/en-us/library/aa903313(v=vs.71).aspx