Application Initialization Module for IIS 7.5

As part of the proof of concept using the application initialization module for IIS 7.5 to increase the initialization speed of web applications, I created a simple web application hosted on IIS 7.5 (Windows Server 2008 R2) with SSL enabled. The following are global and local settings.

If I understand correctly how the application initialization module works, I expect IIS to issue an appinit.aspx request ( https://localhost/alwaysrunning/appinit.aspx ) to initialize the web application. This, however, never happens.

Any ideas?

What is the purpose of the initializationPage attribute?

Any help with this would be greatly appreciated.

EDIT: When I turn off SSL, the application initialization module issues the appinit.aspx request, as expected. I need to get this to work with SSL support though.

Zen

Global settings in applicationHost.config file:

 <add name="appinit" autoStart="true" startMode="AlwaysRunning"> <recycling logEventOnRecycle="Time, Requests, Schedule, Memory, IsapiUnhealthy, OnDemand, ConfigChange, PrivateMemory"> <periodicRestart requests="0" time="00:05:00"> <schedule> <clear /> </schedule> </periodicRestart> </recycling> <processModel identityType="NetworkService" idleTimeout="00:00:00" /> </add> <application path="/alwaysrunning" preloadEnabled="true" applicationPool="appinit"> <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\alwaysrunnig" /> </application> 

Local settings in the web.config application file:

 <applicationInitialization remapManagedRequestsTo="splashscreen.htm" skipManagedModules="true" > <add initializationPage="/appinit.aspx" /> </applicationInitialization> 
+7
source share
1 answer

(I know an old question, but it went unanswered and appeared in my own Google search on this question.)

See the following Microsoft Support article: Failed to complete application initialization if the website requires SSL (KB2843964) . Quote:

Cause

This is design behavior.

Resolution

To get around this restriction, you can consider enabling HTTP (uncheck the option "Require SSL" in the IIS Manager / SSL settings) and use the URL Rewrite Rule to redirect HTTP requests to HTTPS, except for the request coming from the warm-up module:

  <rewrite> <rules> <rule name="No redirect on warmup request (request from localhost with warmup user agent)" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="localhost" /> <add input="{HTTP_USER_AGENT}" pattern="Initialization" /> </conditions> <action type="Rewrite" url="{URL}" /> </rule> <rule name="HTTP to HTTPS redirect for all requests" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" /> </rule> </rules> </rewrite> 

One must love "This Design Behavior." Sigh. Unfortunately, the top search results that I found about this application initialization function do not mention this limitation - unless you interpret the "HTTP request" as the strict meaning of unsafe requests.

+4
source

All Articles