473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

global.asa not execute

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.
Jul 19 '05 #1
3 5693
http://www.aspfaq.com/2076
http://www.aspfaq.com/2144

<an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
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.

Jul 19 '05 #2
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
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:<uN**************@TK2MSFTNGP09.phx.gbl>...
http://www.aspfaq.com/2076
http://www.aspfaq.com/2144

<an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
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.

Jul 19 '05 #3
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
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:<uN**************@TK2MSFTNGP09.phx.gbl>...
http://www.aspfaq.com/2076
http://www.aspfaq.com/2144

<an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
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.

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andr? Roberge | last post by:
I have the following two files: #--testexec.py-- def exec_code(co): try: exec co except: print "error" #-- test.py--
4
by: Corrine | last post by:
Hi, I am creating a global temporary table that is session-specific. I insert a BLOB into this table, and then select the BLOB from this table into a ResultSet. The ResultSet sees this BLOB...
5
by: Dave Anderson | last post by:
I have one IIS 6 machine that seems to ignore global.asa completely. I can't get *anything* to fire -- not Session_OnStart(), not typelib declarations. This is true in the web root as well as in...
9
by: tshad | last post by:
I have an example I copied from "programming asp.net" (o'reilly) and can't seem to get the Sub (writefile) to execute. It displays all the response.write lines that are called directly, but not...
10
by: m.epper | last post by:
Hi to everybody. First of all sorry for my english, I'm italian. How can I execute a portion of code, in a function, into the global scope? Example: <?php
0
by: hynek.cihlar | last post by:
A strange behaviour thatI found in ASP.NET 2.0. I am trying to issue a callback request (handled by ICallbackEventHandler and RaiseCallbackEvent) and a regular GET request in the client browser...
5
by: tech.rawsteak | last post by:
I have a function that retrieves a user's login name from their workstation and looks it up on an employee table to return their full name (ie: jsmith -John Smith). Their full name is then...
2
by: Konstantinos Pachopoulos | last post by:
Hi, i have a problem, the source of which is probably the fact, that i have not understood how to declare global variables - I use the Jython compiler, but i think this is a Python issue... ...
8
by: rottmanj | last post by:
. In order to teach my self more. I have started to convert some of my cf scheduled tasks to perl applications. One area where things are kind of fuzzy is setting up global variables that can be...
4
Fary4u
by: Fary4u | last post by:
Hi for the last few months i've just stuck in 1 error & i don't know how to figer it out could any body find out where is the problem gonna be ? it's working fine but when u add product into...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.