Saturday 20 January 2018

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

itemprop="text">

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

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...