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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:22:01+00:00 2026-06-15T04:22:01+00:00

IN my asp.net MVC4 project I have few .cs files under the app_start folder

  • 0

IN my asp.net MVC4 project I have few .cs files under the app_start folder that needs to be initialized or perform per-authorization tasks etc. When you access the website they take quite a lot of time to perform all these tasks on application start for first time. Is it possible to run all files under app_start folder automatically while deployment. So that when someone access the website for the first time it wont take that much time.

  • 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-06-15T04:22:02+00:00Added an answer on June 15, 2026 at 4:22 am

    Take a look at auto-starting your application

    Add this to your applicationHost.config

    <sites>    
         <site name="MySite" id="1">    
              <application path="/" 
                           serviceAutoStartEnabled="true" 
                           serviceAutoStartProvider="PreWarmMyCache" />    
         </site>    
    </sites>
    <serviceAutoStartProviders>
         <add name="PreWarmMyCache" type="PreWarmCache, MyAssembly" />
    </serviceAutoStartProviders>
    

    and the following to preload your work

    public class PreWarmCache : System.Web.Hosting.IProcessHostPreloadClient {
    
        public void Preload(string[] parameters) {
    
            // Perform initialization and cache loading logic here...
    
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple asp.net MVC4 / EF 4.1 project created with VS 2011,
I just upgraded my project from ASP.NET MVC1.0 to ASP.NET MVC4.0 One thing that
I have a ASP.NET MVC4 project with HTML5 semantic markup enabled. When using @Html.EditorFor(m
Using ASP.NET MVC4 I have created a DelegatingHandler in a WebAPI project. I use
I have an asp.net MVC3 project I made an upgrade to asp.net mvc4 following
I have an ASP.NET MVC4 project which compiles fine in VS2010. For deployment purposes
I have an ASP.NET MVC4 project which builds in TFS. Since adding the MiniProfiler
I have a ASP.NET MVC 4 project - CodeFirst with Entity Framework - that
I have a searchform in my ASP.NET MVC4 project. When someone hasn't fill in
I have the following route configuration in a ASP.NET MVC4 project: routes.MapRoute( name: HttpError,

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.