大网数据广告活动
Web服务器与PHP

Application Initialization fails with SSL

· 52CE 我爱测

This article provides resolutions for the problem that Application Initialization module isn't working for web site configured to require 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

Symptoms

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

Cause

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.

Resolution

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:

<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>

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 04/07/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。