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

  • SEARCH
  • Home
  • 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 361251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:52:45+00:00 2026-05-12T12:52:45+00:00

I am trying to design a Infrastructure libraries for my company. Libraries will have

  • 0

I am trying to design a Infrastructure libraries for my company. Libraries will have typical components like logging, exception handling, email etc. These componants will be used by all the ASP.Net applications hosted on our environment (so hosting environment is my control).

My first step in design is that I would not like the ASP.nEt apps to have direct reference to the library componants. So i am thinking to Injecting these dependecies at runtime. I have evaluated quite a few DI containers (unity, spring.net etc)

But what i dont have to do is to force all the ASP.Net applications to use this DI container. They will be getting a interface Dll for all the library componants and some kind factory dll which will give them the concrete instance of the componant.

My question is whats the best way to design this Factory dll so that only one dll can service all the ASP.Net applications? Can i use one DI container to service all the ASP.Net applications?

  • 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-12T12:52:45+00:00Added an answer on May 12, 2026 at 12:52 pm

    Well, you could simply define a container interface like this:

    public interface IContainer
    {
        T Resolve<T>();
    }
    

    (obviously you can add more methods if you need to). You can then create concrete implementation of this IContainer interface based on your DI Container of choice.

    Such concrete implementations could encapsulate all the configuration that your application needs in terms of registered components.

    Your ASP.NET applications would simply consume the IContainer interface and call the Resolve method to get instances of the necessary components.

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

Sidebar

Related Questions

No related questions found

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.