Global.asax Session_End()...

J

James Hunter Ross

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
 
J

Jeff Siver

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top