Friday 12 February 2016

asp.net - Alternate to copying app.config settings to web.config?



I am working on a class library that uses Microsoft enteprise library logging application block. I have some settings in my app.config file.



Now, when a developer uses this library in a web applications, they have to copy entire config sections and appsettings part from the app.config to the web.config.




Is there something which can be done to bypass this step and makes it easier for developers to use my library without manual copy of all those settings.


Answer



Could try putting the repeated sections in an external config file, adding that file as a reference to the web.config project, and then referencing it in both the app.config & the web.config.


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...