By default, the application pool is automatically reclaimed by IIS after a period of inactivity (no requested operations). After the application pool is recycled, w3wp will not start if no one visits the website. The first user requests access, the website access will be very slow and the user experience will be very bad, and to solve this situation, you can use the IIS application initialization feature.
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.
This case method solves the problem of slow access ASP.Net the first time, and then slow access after a certain period of time.
Added IIS application initialization capabilities
In the Control Panel, click Programs - Enable or Turn off Windows features to add "Application initialization function", as shown below:
ASP.NET Web.config settings
Add the following configuration under the system.webServer node in the web.config file of the website:
initializationPage: iis automatically simulates the relative path page address of the request. hostName: The address of the bound site.
Application pool
In the corresponding website application pool, click Advanced Settings, and select the AlwaysRunning mode in the startup mode, as shown in the following figure:
Enable preloading of the corresponding website
Operation path: Website -> Corresponding website -> Right-click, Advanced Settings -> Selection, Preload is enabled True, as shown in the following figure:
|