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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:15:06+00:00 2026-06-13T23:15:06+00:00

I see Microsoft have released Application Initialization as part of IIS 8.0. Unfortunately it

  • 0

I see Microsoft have released Application Initialization as part of IIS 8.0. Unfortunately it isn’t enabled in the Web Role by default. (by that I mean, “Application Initialization” as a feature of the web server role is not enabled. I know the Web Role has IIS 8.)

Does anyone know how I can enable this from a start-up script? I’ve already a number of start-up scripts, but I’m not sure how to add a server role feature.

The module itself appears inside Server Manager under “Server Roles” -> “Web Server (IIS)” -> “Web Server” -> “Application Development” -> “Application Initialization”.

It’s a shame that this isn’t enabled by default as it will be very useful.

thanks

Kris

  • 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-13T23:15:07+00:00Added an answer on June 13, 2026 at 11:15 pm

    First you’ll need to install the feature using a startup task:

    PKGMGR.EXE /iu:IIS-ApplicationInit
    

    And then you’ll need to configure your site in IIS (startMode and preloadEnabled):

    public class WebRole : RoleEntryPoint
    {
        public override void Run()
        {
            using (var serverManager = new ServerManager())
            {
                var mainSite = serverManager.Sites[RoleEnvironment.CurrentRoleInstance.Id + "_Web"];
                var mainApplication = mainSite.Applications["/"];
                mainApplication["preloadEnabled"] = true;
    
                var mainApplicationPool = serverManager.ApplicationPools[mainApplication.ApplicationPoolName];
                mainApplicationPool["startMode"] = "AlwaysRunning";
    
                serverManager.CommitChanges();
            }
    
            base.Run();
        }
    
        public override bool OnStart()
        {
            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
    
            return base.OnStart();
        }
    }
    

    I wrote a blog post about this and you can find a sample application on GitHub.

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

Sidebar

Related Questions

This question is no longer relevant now that microsoft have released a proper version
Microsoft have recently released a Bing maps objective c component. See here and here
In Microsoft SQL Server: I have seen this question several times, but can't see
In this question I see that microsoft ships the XML documentation files for the
I have inherited a VB.net web app that I'm making some changes on. I'm
I have a Microsoft-Word File which contains several DocVariables. In our application we fill/replace
I have a Web Application project in VS 2012 and when I use the
I have an ocx that can sometimes cause an internal application error when calling
Microsoft just released Code Contracts , a tool that integrates with Visual Studio and
I have a WCF web service that uses ASP.NET session state. WCF sets a

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.