Results 1 to 2 of 2

Thread: Global.asa

  1. #1
    Join Date
    Dec 1969

    Default Global.asa

    I have downloaded the PWS for creating asp files in the home<BR>directory: c:Inetpubwwwroot and a folder named "Ashaaspfolder"where in I have saved the .asp files. I view the file from the browser by keying http://localhost/Ashaaspfolder/file.asp in the IE address bar. I have a doubt in creating global.asa files. Where do I create it? What does the statement "It must be created in the root directory of your web application" imply? Which would be the root directory? I am stuck here and am not able to work with the application/collection/staticobjects properties. <BR>I give below the code in a file saved as staticobj.asp<BR>&#060;object runat=server scope=application<BR> id = myinfo progid="ADODB.connection"&#062;<BR>&#060;/object&#062;<BR>&#060;html&#062;<BR>&#060;body&#06 2;<BR>&#060;%<BR>for each item in application.staticobjects<BR>response.write item & "<BR>"<BR>next<BR><BR>Error message generated while viewing from my browser<BR>Active Server Pages error &#039;ASP 0121&#039; <BR><BR>Invalid Scope in object tag <BR><BR>/Ashaaspfolder/applicationstaticobj.asp, line 2 <BR><BR>The object instance &#039;myinfo&#039; cannot have Application or Session scope. To create the object instance with Session or Application scope, place the Object tag in the Global.asa file. <BR><BR>Please let me know how to proceed. <BR><BR>%&#062;<BR><BR>&#060;/body&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Global.asa

    In this case, the root directory would be wherever http://localhost/ is physically on your hard drive.<BR><BR>I suggest you get yourself a decent ASP book if you are going to start using Application and Session scope variables and static objects.<BR><BR>Craig.

Posting Permissions

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