global.asa not execute

G

Guest

my global.asa file doesn't seem to be executing in IIS
and i don't know how to make them run. Any ideas how to
execute the global.asa file in IIS 5.1 , please let me
know. thank you very much.
 
J

James Bond

Hello Aaron and all,

I am replying to this, coz, my question is related to Global.asa.
I can get that to run, but here is my scenario. We have multiple apps
with their own Global.asa files, but connecting to same database and
using same Error Routines, CleanUp etc. So I thought to consolidate
them using following.

One SetUp file, which will set all variables ( appsetup.asp )
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
strUser = Request.ServerVariables("LOGON_USER")
strPath = Request.ServerVariables("LOGON_USER")
strDBStr = "Production" ( Or Devlopement etc... )
....
</SCRIPT>

Second File which has functions or subs for connection, error display
etc...
( appfunctions.asp )

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Function ConnectToDB(DBName)
objConn.Open ( Connection String )
End Function

Sub ShowError(errMsg, errNo, customMsg )
..... some gaudy HTML output
End Sub

</SCRIPT>

Now in Global.asa for each apps...

<!-- #include file = "common/appsetup.asp" -->
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
App_OnStart...
App_OnEnd ...

Sub Session_OnStart
</SCRIPT>
<!-- #include file = "common/appfunctions.asp" -->
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
ConnectToDB ( NorthWind )
some SQL operations to create session vars.

CleanUp
</SCRIPT>

My problem is....
In the function ( ConnectToDB ) or any Sub, I cannot access the
variables that I set for, those are common for all apps.
What am I missing here ?? Idea behind this is to keep it all at one
place, so it can be easily configurable.

Can anyone please help me on this ?
Thanks,
Snehal
 
J

James Bond

Sorry... The correct version with switched Include files...

Hello Aaron and all,

I am replying to this, coz, my question is related to Global.asa.
I can get that to run, but here is my scenario. We have multiple apps
with their own Global.asa files, but connecting to same database and
using same Error Routines, CleanUp etc. So I thought to consolidate
them using following.

One SetUp file, which will set all variables ( appsetup.asp )
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
strUser = Request.ServerVariables("LOGON_USER")
strPath = Request.ServerVariables("LOGON_USER")
strDBStr = "Production" ( Or Devlopement etc... )
....
</SCRIPT>

Second File which has functions or subs for connection, error display
etc...
( appfunctions.asp )

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Function ConnectToDB(DBName)
objConn.Open ( Connection String )
End Function

Sub ShowError(errMsg, errNo, customMsg )
..... some gaudy HTML output
End Sub

</SCRIPT>

Now in Global.asa for each apps...

<!-- #include file = "common/appfunctions.asp" -->
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
App_OnStart...
App_OnEnd ...

Sub Session_OnStart
</SCRIPT>
<!-- #include file = "common/appsetup.asp" -->
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
ConnectToDB ( NorthWind )
some SQL operations to create session vars.

CleanUp
</SCRIPT>

My problem is....
In the function ( ConnectToDB ) or any Sub, I cannot access the
variables that I set for, those are common for all apps.
What am I missing here ?? Idea behind this is to keep it all at one
place, so it can be easily configurable.

Can anyone please help me on this ?
Thanks,
Snehal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Global.asa 5
global.asa in subdirectory 4
Global.asa not firing 12
include file in global.asa 6
Global.asa 0
Web publish locally 2
Basic Questions about Global.asa from a beginner 1
corrupting global.asa 1

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top