Forgive me if this is a dumb question, I'm new to ASP. I have a virtual Windows Server 2012 handling ASP pages, passing them to the host for testing purposes. There is a global.asa file which declares several Application-level variables, though it doesn't seem to be working. I'm not sure if I need to call the file or what, though I can't find any reference to calling it on the internet.
In global.asa:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
Application("someVar") = "testing..."
'More vars...
End Sub
</SCRIPT>
In default.asp: (Or any other file for that matter)
Repsonse.Write(Application("someVar"))
Nothing will output.
However, if I specify a value immediately beforehand like so:
Application("someVar") = "testing..."
Repsonse.Write(Application("someVar"))
It will output "testing..." like it should.
After that, removing the Application("someVar") = "testing..."
line will still output "testing...". So the variable is being retained, it just isn't being set initially by the global.asa file.
Is there something else I need to do to initialize them via the global.asa file? Is it a problem with my virtual server setup? I should probably mention that navigating to the global.asa file via the web browser gives me a 404 error. I'm not sure if the server is trying to hide it, but I am as certain as I can be that it is in the same directory as default.asp, the browser just refuses to verify this.