Definition of Application_OnStart

Discussion in 'ASP General' started by fruddy, Feb 23, 2004.

  1. fruddy

    fruddy Guest

    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?




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    fruddy, Feb 23, 2004
    #1
    1. Advertising

  2. fruddy

    CB Guest

    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.)
     
    CB, Feb 23, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yop
    Replies:
    4
    Views:
    442
  2. Shiv Kumar

    Global - Application_OnStart question

    Shiv Kumar, Jan 13, 2004, in forum: ASP .Net
    Replies:
    19
    Views:
    764
    Shiv Kumar
    Jan 14, 2004
  3. Marek

    Application_OnStart event

    Marek, May 9, 2004, in forum: ASP .Net
    Replies:
    8
    Views:
    496
    Scott Allen
    May 11, 2004
  4. =?Utf-8?B?QmlsbCBIZWNrbGU=?=

    Application_OnStart

    =?Utf-8?B?QmlsbCBIZWNrbGU=?=, Aug 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    353
    =?Utf-8?B?QnJhZCBRdWlubg==?=
    Aug 16, 2004
  5. =?Utf-8?B?TWlrZSBMb2dhbg==?=

    HTTP Module attaching to Application_OnStart

    =?Utf-8?B?TWlrZSBMb2dhbg==?=, Dec 17, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    4,724
    Steven Cheng[MSFT]
    Dec 31, 2004
Loading...

Share This Page