Not all requests are triggered.
1. application_start (): This method is called when the application is started for the first time and the application domain is created. It is very suitable to put the initialization I code within the application scope in this event processor. For example, you can load and cache data that does not change throughout the lifecycle of an application, such as static product directories in the navigation tree.
2. session_start (): This method is called when a new session starts. This is often used to initialize specific user information.
3. application_error (): This method is called when an unhandled exception occurs in the application.
4. session_end (): This method is called when a user's session ends. When the Code explicitly releases a session or times out because it has not received a customer's request for a long time, a session ends. In this case, you can use this method to clean up any related data.
5. application_end (): This method is called before the application ends.
6. application_disposed (): This method is called when the application is closed and the. NET garbage collector will recycle the memory occupied by the application. Although it is too late to clean up key resources, you can use it to perform the final cleaning to ensure that key resources are released.