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 7645147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:52:00+00:00 2026-05-31T09:52:00+00:00

I have some questions regarding a bootstrapper class. I am using ASP.NET MVC 3

  • 0

I have some questions regarding a bootstrapper class. I am using ASP.NET MVC 3.

Is it still wise to use a bootstrapper in MVC3 to reduce the amount of code in the global.asax file?

What exactly must be loaded in the boostrapper besides the registering of routes? If I want to load site-wide settings (loaded from a database), do I do that here? If this is the case then do I need to inject these settings into each controller? If it gotten in the bootstrapper, how are these values retained?

I am looking for code/articles on how to use Autofac with my bootstrapper. I can only find for Ninject. Has anyone got some code or articles for me?

I found these 2 good articles:

  1. http://www.dominicpettifer.co.uk/Blog/42/put-an-ioc-powered-bootstrapper-in-your-asp-net-mvc-application
  2. http://weblogs.asp.net/rashid/archive/2009/02/17/use-bootstrapper-in-your-asp-net-mvc-application-and-reduce-code-smell.aspx

I am trying to accomplish something like:

protected void Application_Start()
{
     Bootstrapper.Run();
}
  • 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-31T09:52:02+00:00Added an answer on May 31, 2026 at 9:52 am

    Is it still wise to use a bootstrapper in MVC3 to reduce the amount of code in the global.asax file?

    I’m using let’s say a bootstrapper (in fact various start up tasks executed in a particular order) in every web applciation. I put in those tasks all the things I need to be setup: from routes and global filters, to setup the DI container, loading settings from the db (after setting up the DI container) and so on.

    Basically everything that you could have put in global.asax.cs Application_Startnow resides as tasks in a Start Up directory, and each task is a simple class marked as a startup task (I’m using my own toolkit for that). The benefits of a bootstrapper is the easy mantainance of the those tasks, it has no implicit connection with an IoC Container, however setting up the container is usually something that is executed when the app starts.

    If I want to load site-wide settings (loaded from a database), do I do that here

    Only if the settings are static or required to configure the app. It pretty much depends on the type of settings and the type of app. There isn’t a clear and definite answer.

    If this is the case then do I need to inject these settings into each controller

    You don’t inject settings in a controller, you inject dependecies and that’s the IoC container’s job.

    If it gotten in the bootstrapper, how are these values retained?

    The bootstrapper is used only once when app starts, to configure the app then it’s out. It shouldn’t retain values. You may be thinking about settings but even if the bootstrapper loads them, those settings are stored in a different place, usually a cache.

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

Sidebar

Related Questions

I have some questions regarding my MVC learning curve Goal: I want to get
I have some questions regarding the following code: 1 class Test(object): 2 def __init__(self):
I have a couple of questions regarding security mechanisms in asp.net (2.0). I have
I have some questions regarding VB.NET bit shifting. I understand the << >> operators
I have some questions regarding MVC that I would like to clarify. At our
I am still learning to use MVVM and Prism and have some general questions:
There have been some similar questions asked regarding Grid views, but none have been
I have couple questions regarding some C++ rules. Why am I able to call
I came across this class while reading a C# book and have some questions.
I have some questions regarding data base design for simple CMS. Every Page in

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.