Summary analysis of 10 reasons why the Asp.Net site was restarted
- 2020-05-12 02:30:55
- OfStack
1. Recovering the application pool will cause the site to restart, for the following reasons:
HostingEnvironment initiated shutdown HostingEnvironment caused shutdown
2. Changing the application pool recycling rule will cause a restart. The reasons for the record are as follows:
HostingEnvironment initiated shutdown HostingEnvironment caused shutdown
3. Changing the name of the site in IIS will not cause a restart
4. Modify the configuration file web.config in the root directory of the site. Adding a few Spaces in the configuration file comments will cause a restart.
CONFIG change HostingEnvironment initiated shutdown
But changing the web.config file in the subdirectory will definitely cause an immediate restart
5. Modification of aspx,master file will definitely cause restart; However, every modification will result in one recompilation, and the recompilation will result in a site restart after 15 recompilation times. The reasons for the restart are as follows:
Recompilation limit of 15 reached HostingEnvironment initiated shutdown
This number can be configured in web.config by modifying the numRecompilesBeforeAppRestart property value of compilation.
< compilation debug="false" numRecompilesBeforeAppRestart="15" >
6. Deleting the pdb file in the bin directory will cause a restart. The reasons for the restart of the record are as follows:
Change Notification for critical directories.
Creating a new empty folder in the bin directory will cause the site to restart for the following reasons:
Directory rename change notification for 'D:\projects\TestWebApp\TestWeb'.T estWeb dir change or directory rename
Deleting an empty folder in the bin directory will cause the site to restart for the following reasons:
Directory rename change notification for 'D:\projects\TestWebApp\TestWeb'.T estWeb dir change or directory rename
7. The modification of Global.asax file will cause the site to restart, even if a few Spaces are added. The reasons for the record to restart are as follows:
Change in GLOBAL.ASAX HostingEnvironment initiated shutdown
8. Changes to the App_Code directory will cause the site to restart
Adding a folder named App_Code in the root directory of the site will cause a restart. The reason for the record restart is as follows:
Change Notification for critical directories. App_Code dir change or directory rename
Deleting the App_Code folder will cause the site to restart. The reasons for the record restart are:
File Change Notification Error in D:\projects\TestWebApp\TestWeb\app_code
Change Notification for critical directories.
App_Code dir change or directory rename
Creating or deleting a new cs file under the App_Code folder will cause the site to restart, for the following reasons:
Change Notification for critical directories. App_Code dir change or directory rename
9. Any modification to the critical path will cause the site to restart. The critical path includes:
bin, App_Code, Web References,App_Browsers,App_GlobalResources,App_LocalResources
10. In addition, the scanning of files by anti-virus software may cause the es1064en.net process to mistake files or change the critical path, which may also cause restart.
The above are the 10 reasons I summarized that led to the restart of Asp.net site. In general, there are three aspects that can cause a site restart: 1. The IIS configuration changes; 2. On the other hand, configuration files related to asp.net,global documents, aspx, ascx,master and other types of files have changed; The third aspect is the change of critical path bin, app_Code, Web References,App_Browsers,App_GlobalResources,App_LocalResources.