Application Initialization module fails when web site requires SSL

This article helps you resolve the problem where Application Initialization module isn't working for web site configured to require Secure Sockets Layer (SSL).

Original product version:   ASP.NET
Original KB number:   2843964


Application Initialization module formerly known as Application Warmup isn't working for web site configured to require SSL.


This behavior is by design.

The warm-up module sends the request using Hypertext Transfer Protocol (HTTP) and not with Hypertext Transfer Protocol Secure (HTTPS). The workaround suggested will allow HTTP requests to localhost from warm-up module but it redirects to the HTTPS for the rest of the requests so by design here means that the warm-up module makes requests over HTTP.


To work around this limitation, you may consider enabling HTTP (unchecked the Require SSL setting under IIS Manager > SSL Settings) and use a URL Rewrite rule to redirect HTTP requests to HTTPS with the exception of the request coming from the warm-up module:

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