Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Global.asax Session_End()...

Reply
Thread Tools

Global.asax Session_End()...

 
 
James Hunter Ross
Guest
Posts: n/a
 
      10-19-2005
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


 
Reply With Quote
 
 
 
 
Jeff Siver
Guest
Posts: n/a
 
      10-20-2005
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" <> wrote in message
news:%...
> 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
>
>



 
Reply With Quote
 
 
 
 
Alvin Bruney - ASP.NET MVP
Guest
Posts: n/a
 
      10-21-2005
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" <> wrote in message
news:...
> 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" <> wrote in message
> news:%...
> > 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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57