BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WebSnap onEndSession not firing.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet WebSnap
View previous topic :: View next topic  
Author Message
Derek_Smallbouys
Guest





PostPosted: Tue Jan 30, 2007 8:14 pm    Post subject: WebSnap onEndSession not firing. Reply with quote



Hello,

I have a standalone application that logsin to a websnap based
website, once my application has done what it needs to do, I call
session.Terminate on the applications session. The only problem is
that the onEndSession event is not firing until a subsequent action
occurs on the site from another user. Once onEndSession occurs it
affects the session that made that next action and not my application
session.

Quote:
From what I have seen this is a problem of long standing, but I was
wondering if anybody out there is aware or can offer pointers, or ways

around which they managed to solve the problem.

THanks
Back to top
Bob Swart
Guest





PostPosted: Tue Jan 30, 2007 9:23 pm    Post subject: Re: WebSnap onEndSession not firing. Reply with quote



Hi Derek,

Quote:
I have a standalone application that logsin to a websnap based
website, once my application has done what it needs to do, I call
session.Terminate on the applications session. The only problem is
that the onEndSession event is not firing

I noticed that myself a few years ago, and wrote about it (as a small
note) in my WebSnap CGI Login article for The Delphi Magazine, available
as free sample article at
http://www.thedelphimagazine.com/samples/1391/1391.htm

Quote:
From what I have seen this is a problem of long standing, but I was
wondering if anybody out there is aware or can offer pointers, or ways
around which they managed to solve the problem.

Indeed: the OnEndSession event handler is not called automatically when
a WebSnap CGI web server application is unloaded. To enforce this, I had
to write one more line of code in the OnDeactivate event handler of the
WebAppPageModule (note that it won’t work if you put it in the OnDestroy
event handler).

procedure THome.WebAppPageModuleDeactivate(Sender: TObject);
begin
SessionsService.OnEndSession(Self, Session, esTimeOut);
end;

This will ensure that the SessionsSevice.OnEndSession event handler is
called when the web module is deactivated.

A similar trick may work for you as well.

Groetjes,
Bob Swart

--
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Blog: http://www.drbob42.com/blog - RSS: http://drbob42.com/weblog.xml
New Delphi 2006 Courseware e-books at http://www.eBob42.com/courseware
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet WebSnap All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.