Definition of Application_OnStart

F

fruddy

Hi everyone,
Just wanted to ask about Application_OnStart in the
global.asa. Now if I request one page from a particular site when I
first go to that site say mysite.com/default.asp that triggers the
Application_OnStart function.

Now if I request another page on this same site, the Application_OnStart
function would not be called again.

To have it be called again I would have to restart the application in
IIS.

Where does IIS store the Application variables that I might set in the
global.asa eg Application("day") = "Monday"

Just wanted to confirm this is correct.

Whereas the Session_OnStart function is called everytime a new user hits
the site, ie starts the session?

Correct?
 
C

CB

Application and session variables are stored in memory (so if you use a great many session variables and have a great many simultaneous users, you can in theory crash your server, or if you are on a shared server, piss off your web host a lot.

If your website gets constant traffic, the application can stay active for weeks or months. It only times out after a defined period of no activity. For this reason, application variables are not good for something like day of the week. (Nor session variables, unless your users all have a strict 11:59 pm curfew.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top