Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 563237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:38:19+00:00 2026-05-13T12:38:19+00:00

In my current solution I have 18 projects and most of them have their

  • 0

In my current solution I have 18 projects and most of them have their own configuration files (app.config or web.config). Each project uses single shared BLL assembly. I’m using Autofac to handle dependencies but haven’t come with a decent way of managing my configuration.
Configuration entries are roughly the same, but values are different. Some projects use custom config secions and some are not.

I ended up with:

  1. Create single autofac bootstrapper class to register all dependencies except configuration file wrappers.
  2. Create separate assembly (referenced by all projects) with IConfiguration interface.
  3. Create each project’s own implementation of IConfiguration.
  4. Bootstrap dependencies in each project’s appropriate place via shared bootstrapper.
  5. Register project’s own IConfiguration implenentation separately after bootstrap registration.

I’m very new to Autofac and DI in general and striving to find a good balance between complexity and extensibility.

Are there better ways to manage configuration files?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:38:20+00:00Added an answer on May 13, 2026 at 12:38 pm

    In Autofac you use Modules for this purpose. Groups of related components are encapsulated in a module, which is configured by the programmatic API.

    Autofac’s XML configuration has support for modules, so once you’ve decided to use one in an applicaiton, you can register the module (rather than all the components it contains) in the config file.

    Modules support parameters that can be forwarded to the components inside, e.g. connection strings, URIs, etc.

    The documentation here should get you started: http://code.google.com/p/autofac/wiki/StructuringWithModules

    HTH

    Nick

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two projects in the current solution: abc.Dashboard abc.ThingyService abc.ThingyService needs to be
I have a visual studio solution with a half dozen web application projects. I
Here is how our current php development solution is set up: Each developer work
My current code needs to read foreign characters from the web, currently my solution
I'm working on a java project full of Hibernate (3.3.1) mapping files that have
Hey all, quick NHibernate question. In my current project, we have a denormalized table
I've come across a place in my current project where I have created several
I have a visual studio 2010 web project that when I publish it in
In our git-svn managed project, we have 3 upstream projects that are all kept
I have 2 projects : The first project is a structure project which i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.