By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,724 Members | 859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,724 IT Pros & Developers. It's quick & easy.

Global.asa not firing

P: n/a
qaz
For some reason my global.asa file is not firing. I have it located in the
root of my website (e.g., wwwroot\mywebsite\global.asa) and I have the web
site configured as an "application" in IIS. When I modified the file I also
stopped and restarted the web server.

Can anyone give me some ideas as to why it is not firing?

Thanks
Jul 22 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
Well, what evidence do you have thatit is not firing? What method is the
"not firing" occuring in? What is the code in that method?

Have you seen http://www.aspfaq.com/2076 and http://www.aspfaq.com/2078 ?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"qaz" <ng****@uslex.net> wrote in message
news:eX**************@TK2MSFTNGP11.phx.gbl...
For some reason my global.asa file is not firing. I have it located in the root of my website (e.g., wwwroot\mywebsite\global.asa) and I have the web site configured as an "application" in IIS. When I modified the file I also stopped and restarted the web server.

Can anyone give me some ideas as to why it is not firing?

Thanks

Jul 22 '05 #2

P: n/a
qaz
My evidence is pretty good. In Application_OnStart I created an application
variable named Application("test") and set it equal to "Application". In
Session_OnStart I set a session variable called session("test") = "Session".
I put response.write statements in test.asp and fired the page.
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Well, what evidence do you have thatit is not firing? What method is the
"not firing" occuring in? What is the code in that method?

Have you seen http://www.aspfaq.com/2076 and http://www.aspfaq.com/2078 ?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"qaz" <ng****@uslex.net> wrote in message
news:eX**************@TK2MSFTNGP11.phx.gbl...
For some reason my global.asa file is not firing. I have it located in

the
root of my website (e.g., wwwroot\mywebsite\global.asa) and I have the

web
site configured as an "application" in IIS. When I modified the file I

also
stopped and restarted the web server.

Can anyone give me some ideas as to why it is not firing?

Thanks


Jul 22 '05 #3

P: n/a
Make sure mywebsite is setup as an application, and not a subdirectory of
the parent web. If it is a subdirectory, the root global.asa will fire
instead.

"qaz" <ng****@uslex.net> wrote in message
news:eX**************@TK2MSFTNGP11.phx.gbl...
For some reason my global.asa file is not firing. I have it located in the
root of my website (e.g., wwwroot\mywebsite\global.asa) and I have the web
site configured as an "application" in IIS. When I modified the file I also
stopped and restarted the web server.

Can anyone give me some ideas as to why it is not firing?

Thanks

Jul 22 '05 #4

P: n/a

Make sure session cookies are enabled in your browser - Tools, Internet
Options, Privacy, Advanced, check the box "Always allow session cookies"

If you are using IE 5.5 or IE 6.0, and your local server name has an
underscore or other non-alphanumeric character (other than a dash) in the
name, then cookies will not work correctly. One workaround is to access the
machine by IP address; others include renaming the server or at least adding
an entry to the clients' hosts files, or alter your local DNS/WINS, or add a
new host header to the web server, with a more friendly name. For more info,
search http://msdn.microsoft.com/ for Q312461 and Q316112.

Make sure you haven't disabled session state in Internet Services Manager,
and that it has an appropriate timeout value:
Open the Internet Services Manager MMC tool, and expand 'Web Sites'
Right-click 'Default Web Site' or the application in question, and select
'Properties'
On the 'Home Directory' tab, click the 'Configuration...' button
On the 'Options' tab, make sure 'Enable session state' is checked and that
the timeout value (in minutes) is sufficient.
Also, try removing and re-creating the application in the Internet Services
Manager MMC tool. this often fixes problems like this.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
"qaz" <ng****@uslex.net> wrote in message
news:ei**************@TK2MSFTNGP15.phx.gbl...
My evidence is pretty good. In Application_OnStart I created an
application
variable named Application("test") and set it equal to "Application". In
Session_OnStart I set a session variable called session("test") =
"Session".
I put response.write statements in test.asp and fired the page.
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Well, what evidence do you have thatit is not firing? What method is the
"not firing" occuring in? What is the code in that method?

Have you seen http://www.aspfaq.com/2076 and http://www.aspfaq.com/2078 ?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"qaz" <ng****@uslex.net> wrote in message
news:eX**************@TK2MSFTNGP11.phx.gbl...
> For some reason my global.asa file is not firing. I have it located in

the
> root of my website (e.g., wwwroot\mywebsite\global.asa) and I have the

web
> site configured as an "application" in IIS. When I modified the file I

also
> stopped and restarted the web server.
>
> Can anyone give me some ideas as to why it is not firing?
>
> Thanks
>
>



Jul 22 '05 #5

P: n/a
John Blessing wrote on 23 jan 2005 in
microsoft.public.inetserver.asp.general:
Make sure session cookies are enabled in your browser - Tools, Internet
Options, Privacy, Advanced, check the box "Always allow session cookies"


This has nothing to do with:

response.write application("started")

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #6

P: n/a
qaz
Sorry, I don't know what you are talking about. What is
application("started")?
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn*******************@194.109.133.29...
John Blessing wrote on 23 jan 2005 in
microsoft.public.inetserver.asp.general:
Make sure session cookies are enabled in your browser - Tools, Internet
Options, Privacy, Advanced, check the box "Always allow session cookies"


This has nothing to do with:

response.write application("started")

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #7

P: n/a
qaz
Very helpful response - unfortunately I still have the problem. Session
cookies are enabled in the browser (I use them successfully on other pages);
I have no "funny" characters in the local server name; Session State is
enabled in internet services manager and timeout is 20 min; I deleted the
website in IIS (v6) and recreated it. Ugh! It still does not fire
global.asa.

Below is a complete copy of my global.asa file, if that would help:
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
'================================================= ======================
Sub Application_OnStart

Application.Lock
Application("CurrentUsers") = 0
Application("test") = "Application"
Application.Unlock

End Sub
'================================================= ======================
Sub Session_OnStart

Application("CurrentUsers") = Application("CurrentUsers") + 1

session("test") = "Session"

session("IDUser") = 0

'--- force all users to begin on home page ---
response.redirect "default.asp"
End Sub
'================================================= ==========================
====
Sub Session_OnEnd
Application("CurrentUsers") = Application("CurrentUsers") - 1
End Sub
'================================================= ==========================
====
Sub Application_OnEnd

End Sub
</SCRIPT>


"John Blessing" <ne*******@LbeHelpdesk.com> wrote in message
news:35*************@individual.net...

Make sure session cookies are enabled in your browser - Tools, Internet
Options, Privacy, Advanced, check the box "Always allow session cookies"

If you are using IE 5.5 or IE 6.0, and your local server name has an
underscore or other non-alphanumeric character (other than a dash) in the
name, then cookies will not work correctly. One workaround is to access the machine by IP address; others include renaming the server or at least adding an entry to the clients' hosts files, or alter your local DNS/WINS, or add a new host header to the web server, with a more friendly name. For more info, search http://msdn.microsoft.com/ for Q312461 and Q316112.

Make sure you haven't disabled session state in Internet Services Manager,
and that it has an appropriate timeout value:
Open the Internet Services Manager MMC tool, and expand 'Web Sites'
Right-click 'Default Web Site' or the application in question, and select
'Properties'
On the 'Home Directory' tab, click the 'Configuration...' button
On the 'Options' tab, make sure 'Enable session state' is checked and that
the timeout value (in minutes) is sufficient.
Also, try removing and re-creating the application in the Internet Services Manager MMC tool. this often fixes problems like this.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
"qaz" <ng****@uslex.net> wrote in message
news:ei**************@TK2MSFTNGP15.phx.gbl...
My evidence is pretty good. In Application_OnStart I created an
application
variable named Application("test") and set it equal to "Application". In Session_OnStart I set a session variable called session("test") =
"Session".
I put response.write statements in test.asp and fired the page.
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Well, what evidence do you have thatit is not firing? What method is the "not firing" occuring in? What is the code in that method?

Have you seen http://www.aspfaq.com/2076 and http://www.aspfaq.com/2078 ?
--
http://www.aspfaq.com/
(Reverse address to reply.)


"qaz" <ng****@uslex.net> wrote in message
news:eX**************@TK2MSFTNGP11.phx.gbl...
> For some reason my global.asa file is not firing. I have it located in the
> root of my website (e.g., wwwroot\mywebsite\global.asa) and I have the web
> site configured as an "application" in IIS. When I modified the file I also
> stopped and restarted the web server.
>
> Can anyone give me some ideas as to why it is not firing?
>
> Thanks
>
>



Jul 22 '05 #8

P: n/a
Wow, this content looks familiar. If you're going to post others' content
as if it were your own, you would show much more respect if you either cite
the source, or take the time to put it into your own words.

http://www.aspfaq.com/2157

--
http://www.aspfaq.com/
(Reverse address to reply.)


"John Blessing" <ne*******@LbeHelpdesk.com> wrote in message
news:35*************@individual.net...

Make sure session cookies are enabled in your browser - Tools, Internet
Options, Privacy, Advanced, check the box "Always allow session cookies"

If you are using IE 5.5 or IE 6.0, and your local server name has an
underscore or other non-alphanumeric character (other than a dash) in the
name, then cookies will not work correctly. One workaround is to access the machine by IP address; others include renaming the server or at least adding an entry to the clients' hosts files, or alter your local DNS/WINS, or add a new host header to the web server, with a more friendly name. For more info, search http://msdn.microsoft.com/ for Q312461 and Q316112.

Make sure you haven't disabled session state in Internet Services Manager,
and that it has an appropriate timeout value:
Open the Internet Services Manager MMC tool, and expand 'Web Sites'
Right-click 'Default Web Site' or the application in question, and select
'Properties'
On the 'Home Directory' tab, click the 'Configuration...' button
On the 'Options' tab, make sure 'Enable session state' is checked and that
the timeout value (in minutes) is sufficient.
Also, try removing and re-creating the application in the Internet Services Manager MMC tool. this often fixes problems like this.

Jul 22 '05 #9

P: n/a
Hi

My apologies, I have bunch of faq stuff in a macro file, I hadn't realised
it came from aspfaq originally. . Sometimes the users I deal with don't
have internet access and so it is best to give them the answer directly.
--
John Blessing
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:e$****************@TK2MSFTNGP14.phx.gbl...
Wow, this content looks familiar. If you're going to post others' content
as if it were your own, you would show much more respect if you either
cite
the source, or take the time to put it into your own words.

http://www.aspfaq.com/2157

--
http://www.aspfaq.com/
(Reverse address to reply.)


"John Blessing" <ne*******@LbeHelpdesk.com> wrote in message
news:35*************@individual.net...

Make sure session cookies are enabled in your browser - Tools, Internet
Options, Privacy, Advanced, check the box "Always allow session cookies"

If you are using IE 5.5 or IE 6.0, and your local server name has an
underscore or other non-alphanumeric character (other than a dash) in the
name, then cookies will not work correctly. One workaround is to access

the
machine by IP address; others include renaming the server or at least

adding
an entry to the clients' hosts files, or alter your local DNS/WINS, or
add

a
new host header to the web server, with a more friendly name. For more

info,
search http://msdn.microsoft.com/ for Q312461 and Q316112.

Make sure you haven't disabled session state in Internet Services
Manager,
and that it has an appropriate timeout value:
Open the Internet Services Manager MMC tool, and expand 'Web Sites'
Right-click 'Default Web Site' or the application in question, and select
'Properties'
On the 'Home Directory' tab, click the 'Configuration...' button
On the 'Options' tab, make sure 'Enable session state' is checked and
that
the timeout value (in minutes) is sufficient.
Also, try removing and re-creating the application in the Internet

Services
Manager MMC tool. this often fixes problems like this.


Jul 22 '05 #10

P: n/a
qaz wrote on 23 jan 2005 in microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.net> wrote in message
John Blessing wrote on 23 jan 2005 in
> Make sure session cookies are enabled in your browser - Tools,
> Internet Options, Privacy, Advanced, check the box "Always allow
> session cookies"
This has nothing to do with:

response.write application("started")


[please do not toppost on usenet]
Sorry, I don't know what you are talking about. What is
application("started")?

Any application variable you defined and filled in global.asa:

Sub Application_OnStart
Application("myTest") = "Yes Sir"
End Sub
Can be shown in a file test.asp like this:

<%
Response.Write Application("myTest")
%>

Isrrespective of if the browser suppordt session variables.
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #11

P: n/a
qaz
It is setup as an application and it is not in a subdirectory of a parent.

Any other suggestions?
"Lance Wynn" <la********@N.O.S.P.A.M.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Make sure mywebsite is setup as an application, and not a subdirectory of
the parent web. If it is a subdirectory, the root global.asa will fire
instead.

"qaz" <ng****@uslex.net> wrote in message
news:eX**************@TK2MSFTNGP11.phx.gbl...
For some reason my global.asa file is not firing. I have it located in the root of my website (e.g., wwwroot\mywebsite\global.asa) and I have the web site configured as an "application" in IIS. When I modified the file I also stopped and restarted the web server.

Can anyone give me some ideas as to why it is not firing?

Thanks

Jul 22 '05 #12

P: n/a
Check the error log for the IIS server for clues.

Try commenting out the response.redirect in the Session_OnStart to see if
that makes a difference.

Try removing the Session_OnStart and Session_OnEnd and then testing your
Application variables.
Terri Morton
MVP - ASP/ASP.NET

"qaz" <ng****@uslex.net> wrote in message
news:e5****************@TK2MSFTNGP15.phx.gbl...
It is setup as an application and it is not in a subdirectory of a parent.

Any other suggestions?

Jul 22 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.