|
-
Feb 17th, 2001, 07:17 AM
#1
Thread Starter
Addicted Member
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
ASP, SQL, VB6, Java Script and dubious guitar playing skills.
-
Feb 17th, 2001, 04:41 PM
#2
Thread Starter
Addicted Member
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
ASP, SQL, VB6, Java Script and dubious guitar playing skills.
-
Feb 18th, 2001, 07:47 AM
#3
Addicted Member
Try this:
Code:
<script language="VBScript" runat="Server">
Sub Session_OnStart()
application("test")="works okay"
End Sub
</script>
Last edited by Shafee; Feb 18th, 2001 at 07:51 AM.
-
Feb 18th, 2001, 02:16 PM
#4
Thread Starter
Addicted Member
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
ASP, SQL, VB6, Java Script and dubious guitar playing skills.
-
Feb 18th, 2001, 02:35 PM
#5
Addicted Member
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?
-
Feb 18th, 2001, 02:47 PM
#6
Thread Starter
Addicted Member
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
ASP, SQL, VB6, Java Script and dubious guitar playing skills.
-
Feb 18th, 2001, 03:03 PM
#7
Addicted Member
I didn't come across that problem before. I think the others will inherit the properties of the parent directory. Let me check.
-
Feb 18th, 2001, 03:21 PM
#8
Addicted Member
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.
Last edited by Shafee; Feb 18th, 2001 at 03:24 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|