Nobody's been able to answer this one so far..

Results 1 to 2 of 2

Thread: Nobody's been able to answer this one so far..

  1. #1
    Bert Szoghy Guest

    Default Nobody's been able to answer this one so far..

    Hello!<BR><BR>We have a discussion going here, we need to settle it. We are adding our web application files to an existing web site in IIS by mapping our web application as a virtual directory of the existing web site. <BR><BR>Now there will be 2 global.asa files:<BR>“\C:InetPubWWWRootglobal.asa”<BR>“ \C:Program FilesOurAppglobal.asa”<BR><BR>The URL at:<BR><BR><BR>says:<BR>“This article discusses what, exactly, Global.asa is, and how you can use it to increase the power of your Active Server Pages Applications <BR>What is global.asa? You may have noticed that when you create a new web project with InterDev, a file is inserted into the root directory called global.asa. In this file, there are empty event handlers for events such as Application_OnStart, Application_OnEnd, Session_OnStart, and Session_OnEnd. Global.asa is an optional file where you can define event scripts, and create objects that have either Session or Application scope. There can be at most one global.asa file per web application, and it must exist in the root directory of the web application.”<BR><BR>The above could be interpreted as: "if you have multiple applications on your site, then you can have multiple global.asa files". However:<BR><BR>Next, from:<BR><BR><BR>you say:<BR>"The Application object stores data that is application wide. In other words, it stores data for that site only. Each site is considered an "application". Application can be stored in the global.asa file or you can place information in it using ASP."<BR><BR>So, can one web site have multiple global.asa files?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Nobody's been able to answer this one so f

    I&#039m not sure this is a definitive answer or not, but here&#039s a go at it. From my understanding the global.asa is activated when an asp page is activated in its directory or one of its subdirectories, therefore triggering its events. All of its children pages therefore access its objects. if your global asa does not reside in the bottom directory of a given website it would not control that lowest directory level. Therefore in another subdirectory another global.asa could reside. You could go from one side of the application to the other and depending on which asp page you were on would determine which global.asa&#039s objects you would be accessing. I&#039m currently working at a site that is an internet application that uses multiple global.asa&#039s. I&#039m not positive as to their configuration, but I&#039m almost possitive that they did it the way I mentioned above. Maybe this shedded some light on the subject, or maybe is just an addition to the thread. Take it for what you will.

Posting Permissions

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