|
|
Posted on 8/1/2019 4:47:32 PM
|
|
|
|

You think you can be slow, that's impossible! You think you can stay still, but that's impossible!
Henan is the birthplace of the storyline of waiting for the rabbit, which tells the story of a lazy farmer sitting by a stump waiting for the cute little rabbit to hit the tree, so how can this kind of thing happen every day! What you think will always work out the way you think, so taking the initiative will be the most effective way! Every saint has a past, every sinner has a future!
Read to the top:
1. This article takes IIS8 and Windows Server 2012R2 as examples
2. IIS8 runs on Windows Server 2012 and Windows 8 versions and above.
3. The application pool and website exist separately in IIS, but the website operation must be based on the premise that the corresponding application pool is started.
4. By default, the application pool will be automatically reclaimed by IIS after a period of inactivity (no requested operations).
5. IIS8 comes with an application initialization toolkit, IIS7.5 needs to search for independent installation packages for installation, and IIS automatic initialization is not supported for the time being lower than 7.5.
6. This case method can solve the problem of slow access ASP.Net the first time and slow access after a period of time.
Let's get moving!
1. Install the IIS application initialization function
As shown below:
2. Edit the startup mode of the corresponding application pool on the website
As shown in the figure below, the operation path is as follows: Application Pool - > Website Corresponding Program Pool - > Right-click, Advanced Settings - > Selection, Startup Mode AlwaysRunning
3. Enable the corresponding website preload As shown in the figure below, the operation path: Website -> Corresponding website -> Right-click, Advanced Settings -> selection, preload is enabled True
4. Set the configuration editor and write the default preload request
As shown in the figure below, open the configuration editor
As shown in the figure below: In the upper left corner, select system.webServer/applicationInitialization for the configuration node, and other configurations are in the red circle
As shown in the figure below: Add an initialization request address (for IIS initialization default request address) to the collection, and click the Apply button on the right side of the configuration interface.and restart the app pool and website
Remark:
1. Principle description: IIS application initialization will automatically open a new program pool after the first creation of the website or after the application pool of the corresponding website is recycled, and start the website initialization, simulating a normal request to keep the website online.
(This process can be used to simulate website requests with the help of third-party tools or services)
2. Configuration description:
(1) Enable AlwaysRunning: Ensure that the application pool can automatically restart running after being created or recycled for the first time.
(2) Enable website program preloading (true): Ensure that the website can respond to the preload action after the program pool is started.
(3) Configure the default preload path of the website: ensure that the program can quickly compile the program and enter the memory during the preloading process after the program pool is started, so as to ensure a quick response to requests.
(End)
|
Previous:C# classes, static classes, static variables, initialize the execution orderNext:Barbecue encyclopedia, if you want to learn barbecue, please take a look
|