2

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?

CodeNotFound
  • 22,153
  • 10
  • 68
  • 69
HunterXxX
  • 33
  • 1
  • 4

2 Answers2

1

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.

Sea Charp
  • 288
  • 1
  • 6
0

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.