Application_Start and Application_End Event execution time

Source: Internet
Author: User

Application_Start: The first user to access the site will trigger the method. Some system variables are usually defined in this method, such as the total number of online chat rooms, the initialization of historical visitor demographics, and so on.

Application_End: This method is triggered when a Web site is closed or restarted.
Session_Start: triggered when each user accesses the first page of a website;

Session_End: Session.Abandon () is used, or the session timeout is triggered after the user exits.

In this case, when your IIS is configured, the first person, the first time you visit this site, two are triggered. Applicaiton in front, session in the back,
Later, as long as your IIS process does not restart or crash, when someone visits the site, it only executes session_stat.

That is Applicaiton_state () is only triggered when you start the program, as long as your site is running, it will not be triggered.
The session is associated with a user, and it is triggered once by a new user.
Concrete, the landlord can follow a breakpoint, their own debugging can be.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.