简体   繁体   中英

Which event will be triggered when we RESTART Website from IIS

Guess I had explained the question wrongly. Which event will be triggered when we restart Website from IIS Manager -> Sites -> Right Click on the website -> Manage Web Site -> Restart

According to the ASP.NET Application Life Cycle Overview

Application_Start: Called when the first resource (such as a page) in an ASP.NET application is requested. The Application_Start method is called only one time during the life cycle of an application. You can use this method to perform startup tasks such as loading data into the cache and initializing static values.

Accoding to above, the application pool start or recycle will trigger the Application_Start method.

So when you start,recycle the application, update some of the files in the bin folder or update the web.config, the Application_Start will be fired next time when a request comes in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM