473,796 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global.asax Session_End().. .

Friends,

In our Global.asax file we implement Session_End() which grabs our own
object and then calls our own logout() method to tidy things up. Code is
below. (We wrap this in try/catch, but presently ignore exceptions, perhaps
we'll start logging something to help us figure this out.)

RSWeb.RSWebApp webAppInfo = RSWebApp.GetRSW ebApp(Session);
webAppInfo.Logo ut();

But, it appears that our logout isn't reliably being called, and licenses
are being orphaned. It appears that when a session times-out Session_End()
is not being called. SO my question...

Is it a good idea for us to assume Session_End will always be called? In
what situations might we expect it not to get called? (Process or
application restarts, I would guess, which is fine for us.)

Any words on this will be very much appreciated. Thank you very much for
anytime you spend on this.

James Hunter Ross
Nov 19 '05 #1
2 7166
In my experience, I don't use Session End as it isn't that reliable. Having
said that, I haven't tried it in ASP.NET; just in ASP. But, in ASP, it
never worked reliably. Also, I would suspect similar problems in ASP.NET.
One thing I noticed in the SQL Session State implementation is that MS uses
a SQL Job to delete expired sessions instead of tying into the Session End
event. So if they don't use it, I wouldn't use it.

Jeff
"James Hunter Ross" <ja********@one ilsoft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Friends,

In our Global.asax file we implement Session_End() which grabs our own
object and then calls our own logout() method to tidy things up. Code is
below. (We wrap this in try/catch, but presently ignore exceptions,
perhaps we'll start logging something to help us figure this out.)

RSWeb.RSWebApp webAppInfo = RSWebApp.GetRSW ebApp(Session);
webAppInfo.Logo ut();

But, it appears that our logout isn't reliably being called, and licenses
are being orphaned. It appears that when a session times-out
Session_End() is not being called. SO my question...

Is it a good idea for us to assume Session_End will always be called? In
what situations might we expect it not to get called? (Process or
application restarts, I would guess, which is fine for us.)

Any words on this will be very much appreciated. Thank you very much for
anytime you spend on this.

James Hunter Ross

Nov 19 '05 #2
On the contrary, it's very reliable. You need to be familiar with the rules
that govern its firing though.
http://support.microsoft.com/default...b;en-us;555082

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"Jeff Siver" <je********@new sgroups.nospam> wrote in message
news:ON******** ******@TK2MSFTN GP12.phx.gbl...
In my experience, I don't use Session End as it isn't that reliable. Having said that, I haven't tried it in ASP.NET; just in ASP. But, in ASP, it
never worked reliably. Also, I would suspect similar problems in ASP.NET.
One thing I noticed in the SQL Session State implementation is that MS uses a SQL Job to delete expired sessions instead of tying into the Session End
event. So if they don't use it, I wouldn't use it.

Jeff
"James Hunter Ross" <ja********@one ilsoft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Friends,

In our Global.asax file we implement Session_End() which grabs our own
object and then calls our own logout() method to tidy things up. Code is below. (We wrap this in try/catch, but presently ignore exceptions,
perhaps we'll start logging something to help us figure this out.)

RSWeb.RSWebApp webAppInfo = RSWebApp.GetRSW ebApp(Session);
webAppInfo.Logo ut();

But, it appears that our logout isn't reliably being called, and licenses are being orphaned. It appears that when a session times-out
Session_End() is not being called. SO my question...

Is it a good idea for us to assume Session_End will always be called? In what situations might we expect it not to get called? (Process or
application restarts, I would guess, which is fine for us.)

Any words on this will be very much appreciated. Thank you very much for anytime you spend on this.

James Hunter Ross


Nov 19 '05 #3

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

Similar topics

1
4969
by: Steve | last post by:
I am trying to call a file delete function from inside Session_End in Global.asax.cs. However, everytime I step into my delete function from Session_End it jumps to the catch statement and I get the "Object reference not set to an instance of an object." I don't understand why it is happening. I would appreciate any help, thanks. Global.asax.cs using TheFile = Namespace.TheFile; private TheFile sessionEnd = new TheFile();
12
3832
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
4872
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical differences in the way both the objects are handled by IIS. Are both objects stored in different memory spaces? I can access both the objects in my web page. I will be grateful if some one can help me understand the difference.
5
15155
by: ad | last post by:
The Global.asax is code-inside with default. How to change Global.asax to code-behind?
4
7625
by: John A Grandy | last post by:
I installed VS05 RC , created a new Web Site , but I do not see Global.asax , and I do not see Global.asax.cs in the App_Code dir ......
2
3715
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How do I ensure that changes made to the "Global.asax.vb" file are immediately reflected in the "Global.asax" file? After I change to the "Global.asax.vb" file, the "Global.asax" file date modified does not change and I do not see the updated values...
2
2298
by: Michael Tissington | last post by:
How do I specify the CodeFile for my Global.asax file ? According to the documentation I can use the CodeFile attribute with Application, however when I try to use this I get an error saying that it not a valid attribute. <%@ Application Language="C#" Inherits="SQLView.Global" CodeFile="Global.asax.cs"%> --
11
8379
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the generated code on a W2K3 server the application_start and any other event on the global.asax file won't fire. I added tracing and logging to make sure and I can see the code is just not execution. When running the same exact (deployed etc.) code on...
1
1479
by: GaryDean | last post by:
I notice that the global.asax in v2 is inline. because of this I can't say Session = conn; The compiler will accept it but at runtime the exception says "Session State is not available in this context". Is this a downgrade feature from 1.1? -- Regards,
4
3048
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...
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
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,...
1
10173
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
9052
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...
1
7547
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2925
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.