简体   繁体   中英

Application_Start Vs Session_Start

Actually I am new to ASP.NET and I came through these concepts. What is the difference between Application_Start Vs Session_Start ?

And also how to know how many users are currently active in our application? Is by using Application_Start or by using Session_Start ?

Application_Start executes just once when the application/worker process starts or IIS restarts. You can instantiate application variables, for example.

Session_start executes each time a Session is created, such as to instantiate and manage visitor data.

Application_Start Method is Fired on When the Application Started Application_Start runs once before Files are Processed

Where

Session_Start Method is Fired at the beginning of each session. Session_Start runs at the starts of each unique user session.

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