Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Global.asa not firing

Reply
Thread Tools

Global.asa not firing

 
 
qaz
Guest
Posts: n/a
 
      01-23-2005
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


 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      01-23-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
qaz
Guest
Posts: n/a
 
      01-23-2005
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]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Lance Wynn
Guest
Posts: n/a
 
      01-23-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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



 
Reply With Quote
 
John Blessing
Guest
Posts: n/a
 
      01-23-2005

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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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]" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > 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
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      01-23-2005
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)

 
Reply With Quote
 
qaz
Guest
Posts: n/a
 
      01-23-2005
Sorry, I don't know what you are talking about. What is
application("started")?


"Evertjan." <(E-Mail Removed)> wrote in message
news:Xns95E776C94FDBeejj99@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)
>



 
Reply With Quote
 
qaz
Guest
Posts: n/a
 
      01-23-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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]" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> >> 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" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > 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
> >> >
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      01-23-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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.



 
Reply With Quote
 
John Blessing
Guest
Posts: n/a
 
      01-23-2005
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]" <(E-Mail Removed)> wrote in message
news:e$o%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>
>> 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.

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
master page does not change due to preinit event not firing franchise63 General Computer Support 0 02-13-2008 09:18 AM
DataGrid ItemCommand event not firing if not first page =?Utf-8?B?ZGFuYw==?= ASP .Net 3 10-26-2005 05:24 PM
DataGris Paging not working (event not firing) Ryan Rueckl ASP .Net Datagrid Control 8 06-24-2005 07:13 PM
Control not maintaing viewState and PostBack not firing event. Don ASP .Net Building Controls 1 05-16-2005 01:45 PM
Re: onkeypress not being recognized, or not firing S. Justin Gengo ASP .Net 0 08-26-2003 04:15 PM



Advertisments