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

Using GLOBAL.ASAX with Classic ASP?

P: n/a
Can I get the events in GLOBAL.ASAX to fire if a classic ASP page is being accessed by
the user?
Jan 29 '07 #1
Share this Question
Share on Google+
8 Replies

P: n/a
What is the goal ?

A way to do so would be to reference an ASPX page from your ASP page (for
example client side using an IFRAME or à la AJAX etc...)...

"Victor" <vi*@vic.coma écrit dans le message de news:
ul**************@TK2MSFTNGP02.phx.gbl...
Can I get the events in GLOBAL.ASAX to fire if a classic ASP page is being
accessed by
the user?


Jan 29 '07 #2

P: n/a
Patrice, thanks for responding.

One reason is I'm counting sessions as they start and end with Session_OnStart and
Session_OnEnd. I want to be able to not include spiders, and using
Request.Browser.Crawler is a nice, low-maintenance way of doing that.

Also, I understand that Session_OnEnd is much more reliable in GLOBAL.ASAX rather than
GLOBAL.ASA.

The website is presently over 500 pages of information. Some are old pages from the
website's earlier incarnations, including early static pages, and not part of the
present main application, so including IFRAMEs would not be practical at all.

So, my original inquiry stands.

Victor
"Patrice" wrote...
What is the goal ?

A way to do so would be to reference an ASPX page from your ASP page (for
example client side using an IFRAME or à la AJAX etc...)...

"Victor" wrote...
Can I get the events in GLOBAL.ASAX to fire if a classic ASP page is being
accessed by
the user?


Jan 29 '07 #3

P: n/a
No, but you can get global.asa events to fire with classic ASP.
You can fire all the events you need for classic ASP in it.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Victor" <vi*@vic.comwrote in message news:ul**************@TK2MSFTNGP02.phx.gbl...
Can I get the events in GLOBAL.ASAX to fire if a classic ASP page is being accessed by
the user?

Jan 29 '07 #4

P: n/a
My personal preference wouldn't be to use GLOBAL.ASAX to workaround possible
issues with GLOBAL.ASA (IMO this will complicate the all thing plus I'm not
sure that session end is much more reliable, for example if you later switch
to the SQL provider for sessions it won't work at all).

I would prefer much more to workaround the ASP issue I have with ASP alone.
For example you could :
- read the appropriate performance counter (possibly using a .NET assembly)
- keep track of session yourself without using the global.asa OnEnd event
(just register the last request date/time count for all sessions and count
those for which you had requests within the last "timeout" minutes, it could
be also a way to track if Session_end causes problem that is doing both and
comparing if you get the same value)

Also you could try a classic ASP newsgroup to see how others have workaround
this issue instead of adding ASP.NET to your equation...
"Victor" <vi*@vic.coma écrit dans le message de news:
OV*************@TK2MSFTNGP02.phx.gbl...
Patrice, thanks for responding.

One reason is I'm counting sessions as they start and end with
Session_OnStart and
Session_OnEnd. I want to be able to not include spiders, and using
Request.Browser.Crawler is a nice, low-maintenance way of doing that.

Also, I understand that Session_OnEnd is much more reliable in GLOBAL.ASAX
rather than
GLOBAL.ASA.

The website is presently over 500 pages of information. Some are old pages
from the
website's earlier incarnations, including early static pages, and not part
of the
present main application, so including IFRAMEs would not be practical at
all.

So, my original inquiry stands.

Victor
"Patrice" wrote...
>What is the goal ?

A way to do so would be to reference an ASPX page from your ASP page (for
example client side using an IFRAME or à la AJAX etc...)...

"Victor" wrote...
Can I get the events in GLOBAL.ASAX to fire if a classic ASP page is
being
accessed by
the user?




Jan 29 '07 #5

P: n/a
"Juan T. Llibre" wrote...
No, but you can get global.asa events to fire with classic ASP.
You can fire all the events you need for classic ASP in it.
Um, global.asa is SUPPOSED to work with Classic ASP. That's what it is for!!!


Jan 29 '07 #6

P: n/a
"Patrice" wrote...
My personal preference wouldn't be to use GLOBAL.ASAX to workaround possible
issues with GLOBAL.ASA (IMO this will complicate the all thing plus I'm not
sure that session end is much more reliable, for example if you later switch
to the SQL provider for sessions it won't work at all).
GLOBAL.ASAX is significantly more reliable than GLOBAL.ASA when it comes to
Session_OnEnd. We ran some simple tests to prove it - try it yourself.

Your statement on the SQL provider is not applicable to our sitiation.
>
I would prefer much more to workaround the ASP issue I have with ASP alone.
For example you could :
- read the appropriate performance counter (possibly using a .NET assembly)
- keep track of session yourself without using the global.asa OnEnd event
(just register the last request date/time count for all sessions and count
those for which you had requests within the last "timeout" minutes, it could
be also a way to track if Session_end causes problem that is doing both and
comparing if you get the same value)
First of all, this is a hell of a lot of work to do when compared to using GLOBAL.ASAX,
which is a much more elegant, simple, and EFFICIENT solution. Right now, the site loads
lightening fast because we keep the code tight and optimized. Your solution generates
overhead that can be easily eliminated by using a GLOBAL.ASAX solution.

Second, your suggestion simply doesn't work. Remember, I have over 500 pages, including
some old legacy pages. Tracking all sessions would not be practical at all.

I appreciate your help, but if you don't know how to do what I want I'd rather you admit
that instead of trying to talk me out of doing it. I've been told that what I want to do
can be accomplished by a setting in IIS.

Victor

Jan 29 '07 #7

P: n/a
re:
Um, global.asa is SUPPOSED to work with Classic ASP. That's what it is for!!!
Duh!

Exactly...

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Victor" <vi*@vic.comwrote in message news:uF****************@TK2MSFTNGP03.phx.gbl...
"Juan T. Llibre" wrote...
>No, but you can get global.asa events to fire with classic ASP.
You can fire all the events you need for classic ASP in it.
Um, global.asa is SUPPOSED to work with Classic ASP. That's what it is for!!!

Jan 29 '07 #8

P: n/a
re:
I've been told that what I want to do can be accomplished by a setting in IIS.
You could map global.asax to asp.dll, but that wouldn't make
those events available to you as they, simply, don't exist in ASP.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Victor" <vi*@vic.comwrote in message news:%2******************@TK2MSFTNGP02.phx.gbl...
"Patrice" wrote...
>My personal preference wouldn't be to use GLOBAL.ASAX to workaround possible
issues with GLOBAL.ASA (IMO this will complicate the all thing plus I'm not
sure that session end is much more reliable, for example if you later switch
to the SQL provider for sessions it won't work at all).

GLOBAL.ASAX is significantly more reliable than GLOBAL.ASA when it comes to
Session_OnEnd. We ran some simple tests to prove it - try it yourself.

Your statement on the SQL provider is not applicable to our sitiation.
>>
I would prefer much more to workaround the ASP issue I have with ASP alone.
>For example you could :
- read the appropriate performance counter (possibly using a .NET assembly)
- keep track of session yourself without using the global.asa OnEnd event
(just register the last request date/time count for all sessions and count
those for which you had requests within the last "timeout" minutes, it could
be also a way to track if Session_end causes problem that is doing both and
comparing if you get the same value)
First of all, this is a hell of a lot of work to do when compared to using GLOBAL.ASAX,
which is a much more elegant, simple, and EFFICIENT solution. Right now, the site loads
lightening fast because we keep the code tight and optimized. Your solution generates
overhead that can be easily eliminated by using a GLOBAL.ASAX solution.
Second, your suggestion simply doesn't work. Remember, I have over 500 pages, including
some old legacy pages. Tracking all sessions would not be practical at all.
I appreciate your help, but if you don't know how to do what I want I'd rather you admit
that instead of trying to talk me out of doing it. I've been told that what I want to do
can be accomplished by a setting in IIS.
Victor

Jan 29 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.