Within an web.config-file in an ASP.NET-application some sections of config, like app开发者_JAVA技巧Settings and connectionStrings, supports the attributes file and configSource.
I\'m using ConfigurationManager.OpenMappedExeConfiguration to read and modify web.config files of remote web services. This works well for the most part.
According to the MSDN documentation, configSource is supported on Windows Server 2003 SP2. However, when I try to access a setting using the following syntax:
I use ConfigSource=localfile to keep my connectionstrings in a separate file on the productiton server.This works great.
Is there a way to use a generated file as a configSource for a web.config section? In web.config, I tried a simple:
I have an project csproj, with app.config file, and logging Ent.Librarysection using configsource attribute. The logging section is in ahother file Config\\loggingconfiguration.config.