Brainlock on global.asa

Results 1 to 3 of 3

Thread: Brainlock on global.asa

  1. #1
    Charles Guest

    Default Brainlock on global.asa

    I am trying to create a session variable in the Session_OnStart event. I have tried the following:<BR><BR>Session("sMyVar") = 1<BR>or<BR>sMyVar = 1<BR>or<BR>Dim sMyVar<BR>sMyVar = 1<BR>or<BR>Dim sMyVar<BR>Session("sMyVar") = 1<BR><BR>I am beginning to think that my global.asa file is not being read when the browser hits the first page. The global.asa file is located in the same folder as the index.html page.<BR>Should the global.asa be included in the index.html page or is there an IIS setting the needs to be changed. The subdirectory these files are located in is not the root of the web page.<BR><BR>Charles

  2. #2
    Charles Guest

    Default The answer is

    ASP seems to only look at the root of the web for global.asa. My version of global.asa was not being read. Placed it in the root and all of my variables came to life.<BR><BR>So, is there a way to have a different global.asa based on subdirectory?<BR><BR>If a web site has 3 different applications, it would be easier to have 3 custom global.asa files in the subdirectory of the application!<BR>

  3. #3
    Amogh Guest

    Default RE: The answer is

    No the global.asa will be ONLY ONE irrespective of the number of applications in that folder.<BR>And it should be located in the root folder,because global.asa is searched first and it is searched in the root directory only.<BR>If it&#039;s not found in the root then global.asa in any other folder is not recognised.

Posting Permissions

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