This experience is based on Iis8,windows Server 2012R2 as a case in review.
IIS8 runs on platforms above Windows Server and Windows 8.
The application pools and Web sites in IIS are separate, but the Web site runs must be built on the premise that the corresponding application pool is started.
By default, the application pool is automatically recycled by IIS after a period of inactivity (no request action).
IIS8 with the Application Initialization toolkit, IIS7.5 to search for a standalone installation package for installation, less than 7.5 temporarily does not support IIS initialization automatically.
The method in this article can solve the problem that ASP.net first visit is slow, after a period of time, and access slow. Method/Step
Install the IIS application initialization feature, as shown in the following illustration:
Edit Web site corresponding application pool startup mode, Operation path: Application pool-> Web site corresponding program pool-> right button, advanced settings-> Select, boot mode alwaysrunning, as shown in the following figure:
Open the corresponding web site preload, Operation path: website-> corresponding website-> right button, advanced settings-> Select, preload is enabled True, as shown in the following figure:
Set the configuration Editor, write the default preload request, and open the configuration Editor as shown in the following illustration:
In the upper-left corner, configure the node to select System.webserver/applicationinitialization, other configurations such as the red circle, as shown in the following illustration:
Add an initialization request address (for IIS to initialize the default request address) in the collection, click the Apply button on the right side of the configuration interface, and restart the application pool and Web site as shown in the following illustration: 7
Summarize:
1, Principle: IIS application initialization will be the first time after the site is created or the corresponding Web site application pool after recycling, automatically open a new program pool, and start the site initialization, simulation of a normal request, so that the site has been in the online state.
(This process can use third-party tools or services to simulate a Web site request to achieve the same purpose)
2, configuration instructions:
(1), enabling application Pooling (alwaysrunning): Ensure that the application pool is automatically restarted again after the first time it is created or reclaimed.
(2), enable the Web site program preload (TRUE): To ensure that the program pool after startup, the site can respond to preload action.
(3), configure the site default preload path: To ensure that the program in the program pool startup, the site preloading process, can quickly compile the program and enter the memory, to ensure rapid response request.