Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Log new sessions



Permlink Replies: 3 - Last Post: Dec 17, 2017 3:15 AM Last Post By: Denville Longhu... Threads: [ Previous | Next ]
Denville Longhu...

Posts: 57
Registered: 3/4/06
Log new sessions
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 15, 2017 11:28 AM
I would like to display/log all new connections. I have the demo how to iterate current sessions using properties (IP, Browser) of the iterated TIWApplication (and it works fine), but I cannot see where to set an event to get this data as the new session is created (and also when destroyed). Any help appreciated. Thanks.
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Log new sessions
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 15, 2017 11:37 AM   in response to: Denville Longhu... in response to: Denville Longhu...
Denville Longhurst wrote:
I would like to display/log all new connections. I have the demo how to iterate current sessions using properties (IP, Browser) of the iterated TIWApplication (and it works fine), but I cannot see where to set an event to get this data as the new session is created (and also when destroyed). Any help appreciated. Thanks.

You would only want to iterate in order to get a full list, and really should only do that when looking for a summary.

If you want to see a new session as it is created, you will find it in the server controller event IWServerControllerBaseNewSession(). You will see it destroyed in IWServerControllerBaseCloseSession().

Within those events, look at aSession.AppID for the session ID

Dan
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: Log new sessions
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 16, 2017 6:02 AM   in response to: Denville Longhu... in response to: Denville Longhu...
to add to what Dan answered, here is what i use in my IWServerControllerBaseNewSession's SA app (window) when i want to test and monitor :
uses
  IW.Browser.Other, IW.Browser.Browser, IW.Browser.Safari, IW.Browser.InternetExplorer, IW.Browser.SearchEngine,
  IWMain;   //this unit is for writing the Log in the Main server-screen
 
Var SessionsCount : Integer;
 
  Inc(SessionsCount);
  FormIWMain.Log('Connection number ('+IntToStr(SessionsCount)+') STARTED at : '+DateToStr(Now)+ '  ***'+TimeToStr(Now)+ '***  , from IP : '+WebApplication.IP);
  FormIWMain.Log('User Agent : '+ASession.Request.UserAgent);
  FormIWMain.Log('Browser name & Version : '+WebApplication.Browser.BrowserName+' - '+IntToStr(WebApplication.Browser.MajorVersion));
  FormIWMain.Log('Referring URL : '+WebApplication.ReferringURL);
  FormIWMain.Log('------------------------------------');


Edited by: Eitan Arbel on Dec 16, 2017 4:03 PM
Denville Longhu...

Posts: 57
Registered: 3/4/06
Re: Log new sessions
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 17, 2017 3:15 AM   in response to: Denville Longhu... in response to: Denville Longhu...
Denville Longhurst wrote:
I would like to display/log all new connections. I have the demo how to iterate current sessions using properties (IP, Browser) of the iterated TIWApplication (and it works fine), but I cannot see where to set an event to get this data as the new session is created (and also when destroyed). Any help appreciated. Thanks.

Brilliant, thanks both. Happy Christmas.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02