Results 1 to 2 of 2

Thread: Global.asa

  1. #1
    Join Date
    Dec 1969

    Default Global.asa

    Hi<BR><BR>Following code is a part of the Global.asa.<BR><BR>sub Session_OnStart<BR><BR>&#039You need to lock the application for concurrency reasons<BR>Application.Lock<BR>Application("Visito rCount") = Application("VisitorCount") + 1<BR>Application.UnLock<BR><BR>end sub<BR><BR><BR>Why is it required to lock the application just before incrementing the visitor count.<BR><BR>The documnentation refers to &#039...concurrency reasons&#039 which is not clear.<BR><BR>Thanks<BR>RM<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Global.asa

    Because there&#039s only one Application object per IIS Appication.<BR><BR>If you don&#039t lock the Application object, multiple scripts can try to change the Application object variables at the same time, and that will (potentially) cause you errors.<BR><BR><BR>HTH<BR><BR>Darren<BR>[ ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts