473,729 Members | 2,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using GLOBAL.ASAX with Classic ASP?

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
8 5778
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
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
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.comwro te in message news:ul******** ******@TK2MSFTN GP02.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
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.p hx.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
"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
"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
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.comwro te in message news:uF******** ********@TK2MSF TNGP03.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
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.comwro te in message news:%2******** **********@TK2M SFTNGP02.phx.gb l...
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2678
by: Brian Birtle | last post by:
**** A CHALLENGE TO THE GURUS - refute the statement "It's impossible to build a file upload progress meter using ASP.NET" **** First person to prove me wrong gets "All Time .NET Programming GOD" listing in my address book and (optionally) their name listed on my "news" page of my birtle.com website (listed as "Jane Smith is a Programming GOD") for at least a month. Why not take a moment to read more and possibly boost your ego to all time...
12
2413
by: Luther Hert | last post by:
While trying to work through textbook lessons for Vb.net Step by Step,Version 2003, Chapter 22, the first step is to create a new Web application Project,using the ASP.Net Application icon in the Visual Basic Projects folder. When I select the ASP.Net Application icon and type in http://localhost/MyWebCalculator, I recieve an error in a dialogue box stating: MS Development Environment Dialogue Box error message:
3
6127
by: hansiman | last post by:
I use Application_Start in global.asax to set some physical folder paths ie.: Application("pdf") = "c:\www\<site>\pdf\" global.asax uses code behind. When I move the project from the dev to the production server the global.asax code behind is compiled into the project.dll (i guess). This renders the physical paths unusable (naturally). Coming from
12
3823
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it (the oleDBConnection on global.asa.vb) at the other aspx pages ?
8
1912
by: Bill | last post by:
Anyone have any success in using global.asax to protect images in a folder from being linked to by external websites? I'd tried to use global.asa in the past, with no success. Any help would be appreciated. THANKS, Bill.
1
3309
by: Anonieko | last post by:
Global.asax? Use HttpModules Instead! In a previous post, I talked about HttpHandlers - an underused but incredibly useful feature of ASP.NET. Today I want to talk about HttpModules, which are probably more common than HttpHandlers, but could still stand to be advertised a bit more. HttpModules are incredibly easy to explain, so this will hopefully be a short-ish post. Simply put, HttpModules are portable versions of the global.asax....
7
6248
by: teo | last post by:
I need to use the 'Server.MapPath' function in the 'Session_End' event of the Global.asax file (to reach a folder and the clean some temporary files up), but it doesn't work: Sub Session_End(ByVal sender As Object, ByVal e As EventArgs) Dim myPath As String = (Server.MapPath("../public/MyFolder/") End Sub
4
3041
by: Al Santino | last post by:
Hello, I've created a simple C# web services project using Visual Studio 2005. My service compiles and runs correctly when called by remote clients. I'm able to step through the service in the debugger unless I add a Global.asax file. When I do that and then try to run the debugger I receive error 403. If I remove the Global.asax file things work fine. The Global.asax file is the one generated by VS 2005 - I don't try to add anything...
16
5041
by: thefritz_j | last post by:
We just converted our VS2003 1.1 VB web project (which was working fine) to VS2005 2.0 and now I get: Parser Error Message: Could not load type '<Namespace>.'. Source Error: Line 1: <%@ Application Codebehind="Global.asax.vb" Inherits="<Namespace>." %> I've done a lot of things I've found on the web to no avial, but here are some unique things about what is happening to me.
0
8763
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9284
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9202
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9148
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8151
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2165
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.