Saturday, August 24, 2019

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

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...