1. Recycling of application pools causes the site to be restarted, as recorded by:
Hostingenvironment initiated shutdown hostingenvironment caused shutdown
2. Modifying the application pool recycle rule causes the restart, and the logged restart reason:
Hostingenvironment initiated shutdown hostingenvironment caused shutdown
3. Modifying the name of a site in IIS does not cause a reboot
4. Modifying the profile of the site root directory web.config, adding a few spaces in the profile comment will cause the restart, and the record restarts because:
CONFIG Change hostingenvironment initiated shutdown
But modifying a subdirectory's Web.config file does not necessarily cause immediate restart.
5. Modifying the Aspx,master file does not necessarily cause a reboot, but each time the modification results in a recompile, and the number of iterations is 15 times, causing the site to restart, and the reason for the reboot is:
recompilation limit of reached Hostingenvironment initiated shutdown
Reboot after 15 times this number can be configured in Web.config, modify compilation Numrecompilesbeforeapprestart property values.
<compilation debug= "false" numrecompilesbeforeapprestart= ">"
6. Deleting the PDB file in the bin directory will cause a reboot, and the logging restart is due to:
Change Notification for critical directories.
Creating a new empty folder in the Bin directory causes the site to restart, and the reason for the reboot is:
Directory Rename change notification for ' D:\projects\TestWebApp\TestWeb '. T estweb dir Change or directory rename
Deleting an empty folder in the Bin directory causes the site to restart, logging the reason:
Directory Rename change notification for ' D:\projects\TestWebApp\TestWeb '. T estweb dir Change or directory rename
7. Modifying the Global.asax file will cause the site to reboot, even if a few spaces will be restarted, the record restart reason is:
Change in GLOBAL. ASAX Hostingenvironment initiated shutdown
8. Making changes to the App_Code directory will cause the site to restart
Adding a folder named App_Code under the site root causes a reboot, and the record restarts because:
Change Notification for critical directories. App_Code dir Change or directory rename
Deleting the App_Code folder causes the site to restart, and the record restarts because:
File change Notification Error in D:\projects\TestWebApp\TestWeb\app_code
Change Notification for critical directories.
App_Code dir Change or directory rename
Creating a new or deleted CS file under the App_Code folder causes the site to restart, and is logged because:
Change Notification for critical directories. App_Code dir Change or directory rename
9. Changes to the critical path will cause the site to restart, and the critical paths include:
Bin, App_Code, Web references,app_browsers,app_globalresources,app_localresources
10. Additionally, the scanning of files by antivirus software may cause the asp.net process to mistakenly believe that the file or the critical path has changed, and will cause a reboot.
These are the 10 reasons I've summed up to cause the ASP.net site to restart. In general, there are three areas that will cause the site to restart: On the one hand, the IIS configuration changes, on the other hand asp.net related file configuration files, global files, Aspx,ascx,master and other types of file changes; The third is the critical path Bin,app_code , the Web references,app_browsers,app_globalresources,app_localresources changed.