Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

Global.asax Session_End()...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Hunter Ross - 19 Oct 2005 19:05 GMT
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.GetRSWebApp(Session);
webAppInfo.Logout();

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
Jeff Siver - 20 Oct 2005 21:08 GMT
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

> Friends,
>
[quoted text clipped - 18 lines]
>
> James Hunter Ross
Alvin Bruney - ASP.NET MVP - 21 Oct 2005 19:14 GMT
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.aspx?scid=kb;en-us;555082

Signature

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
-------------------------------------------------------

> 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
[quoted text clipped - 27 lines]
> >
> > James Hunter Ross

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.