Lee Warner
Lee Warner

Reputation: 2593

Deploy multiple configs or put everything in a single web config?

Our solution file contains many different projects including an ASP.NET MVC web app, a windows service, and several desktop applications. One project handles logging and has an app.config file containing a list of recipients to inform when something fatal has been logged.

Concerning the deployment of our webapp, I was wondering if it would be better to create a section in the web.config containing this information so that I wouldn't have to deploy the logger's app.config, or is it better to do deploy separately, since other applications use the logger and it should depend on its own file to tell it who to inform?

Upvotes: 1

Views: 91

Answers (2)

Derek Greer
Derek Greer

Reputation: 16292

Typically it's best to push the responsibility of infrastructure configuration up to the consuming client application (whether that be configuration through code, Web.config, app.config, etc.). That is to say, if the library is expecting certain sections to exist in the default config file, make providing this the responsibility of the client's config.

Upvotes: 1

John Farrell
John Farrell

Reputation: 24754

Do what makes the most sense to you and your team.

I've seen this done a dozen ways and it never changed how successful the application was and no customer/stakeholder/enduser ever cared.

Upvotes: 0

Related Questions