Click to See Complete Forum and Search --> : global.asa
alexmac
Feb 17th, 2001, 06:17 AM
Okay I havent used Global.asa before and am having trouble getting it to do anything!
I know that the global.asa file should be put in the root directory of the site.
Here is the script I am using:
<script language=vbscript runat=server>
Sub Session_OnStart()
application("test")="works okay"
End Sub
</script>
And then to see if it works I try something like
<%= application("test")%>
I am testing this on PWS not IIS will it only work on IIS?
Any help would be appreciated,
Alex
alexmac
Feb 17th, 2001, 03:41 PM
Thanks for the reply Bios I changed the directory properties to what you said unfortunely I still cant get it to work.
Here is the location of the filed:
inetpub/wwwroot/testglobal/global.asa
The other files to testing global.asa are also in this directory.
I bought a new computer recently and when I installed PWS it installed something it called Personal Web Manager (which looks exactly the same as PWS Im sure it was called PWS originally through - is there a difference?)
Is my script wrong? If some one could give me a sample global.asa file to test that would be cool.
Thanks,
Alex
Shafee
Feb 18th, 2001, 06:47 AM
Try this:
<script language="VBScript" runat="Server">
Sub Session_OnStart()
application("test")="works okay"
End Sub
</script>
alexmac
Feb 18th, 2001, 01:16 PM
I added a virtual directory to PWS that refered to my testing directory. When you refer to the directory by its alias rather than its actual name it works.
I guess the server docent recognise the scripting options or something(?) or are directory options not inherited to sub directories ?
Thanks,
Alex
Shafee
Feb 18th, 2001, 01:35 PM
I'm afraid that I don't understand what you are asking. Could you elaborate on that? Are you creating a sub directory in the web-shared directory?
alexmac
Feb 18th, 2001, 01:47 PM
Sorry Im not explaing well.. I have created several physical directories in inetpub/wwwroot for the different sites I work on. I thought if I gave Inetpub permissions to run scripts then other directories below in the hierarchy would inherit its properties. But it seems you have to make each directory a virtual directory and set properties on it.
Thanks,
Alex
Shafee
Feb 18th, 2001, 02:03 PM
I didn't come across that problem before. I think the others will inherit the properties of the parent directory. Let me check.
Shafee
Feb 18th, 2001, 02:21 PM
Yep. You are right. Guess we have to make a virtual directory and set its properties. All this time I thought that the sub directory inherits the properties of the parent directory. Thanks alexmac.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.