Application Initialization with IIS 10

Viewed 2383

I'm trying to configure application initialization (see Application Initialization in IIS 8.0) for my ASP.NET MVC site, but I can find no mention of this feature for IIS 10.

I tried following the steps in the linked guide, but they had no effect.

I'm just trying to add a splash page while the initial Application_Start is run. I could configure the site to stay online indefinitely (currently using IIS's default functionality to suspend(?) after 20 minutes of inactivity), but this is not the desired behavior.

Excerpt from linked MS Docs page describing the behavior I'm looking for:

While an application is being initialized, IIS 8.0 can also be configured to return static content as a placeholder or "splash page" until an application has completed its initialization tasks.

1 Answers

I know this is an old question but someone like me can benefit from the answer.

From IIS Manager, you can set this through Configuration Editor of the site. From the dropdown list of Sections, choose system.webServer/applicationInitialization for setting your "splash page". remapManagedRequestsTo element can be set as the name of your splash page file.

From ms docs: (I know this is from IIS 8.0 but element was not modified in IIS 10.0.)

<applicationInitialization
    remapManagedRequestsTo="Startup.htm" 
    skipManagedModules="true" >
  <add initializationPage="/default.aspx" />
</applicationInitialization>

The applicationInitialization element tells IIS that it should issue a request to the application's root Url ("/default.aspx" in this example) in order to initialize the application. While IIS waits for the request to "/default.aspx to complete, it will serve "Startup.htm" to any active browser clients. "Startup.htm" is the "splash page" for the application.

Related