We've been using the Application Initialization module with IIS 7.5 for quite a while now, and it always worked perfectly.
However, we've just started implementing SSL, and it seems to create a conflict with the warm-up. I've done quite a bit of research, but no solution worked so far.
Basically the issue is that the initialization module doesn't follow redirections. We have to keep http enabled for a certain part of the site, but we do redirect all other HTTP visits to their HTTPS equivalent. I've solved this using a rewrite rule, that throws a 302 to the https page. The initialization receives this 302, but just ignores it.
Solutions I've tried:
APP_WARMING_UP server variable
This one would make the most sense. I could simply make the rewrite rule ignore every request whenever {APP_WARMING_UP} returns 1. According to the documentation this is set to 1 as long as the initialization is still running. This unfortunately doesn't work at all, as {APP_WARMING_UP} simply returns an empty string at all times. Maybe this is a limitation with 7.5? (See my rewrite rule below.)
Change the initialization page to the HTTPS version
Currently it's configured like this:
<applicationInitialization remapManagedRequestsTo="Warmup.htm" skipManagedModules="true" doAppInitAfterRestart="true">
<add initializationPage="/WarmUp?id=1" />
</applicationInitialization>
I tried changing the URL to "https://{HTTP_HOST}/Login/WarmUp?id=1" and even replaced the {HTTP_HOST} with the absolute address, but both configurations seem to completely disable the application initialization. It doesn't even make a page request anymore.
This is the documentation on the module:
http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization
This is my rewrite rule which is basically being the culprit in the whole ordeal. It's the only one.
<rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{APP_WARMING_UP}" pattern="1" negate="true" />
<add input="{REQUEST_URI}" pattern="/services" negate="true" />
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" logRewrittenUrl="true" />
<serverVariables>
<set name="SKIP_MANAGED_MODULES" value="0" />
</serverVariables>
</rule>
Anyone able to help?