Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Track users activities

$
0
0
Re: Track users activities
Web Connection 5.0
Re: Track users activities
10/27/2012
12:52:11 PM
3MP0RL3GW Show this entire thread in new window
Gratar Image based on email address
From:
Rick Strahl
To:
Attachments:
None

The server object doesn't have access to the Session. In fact, the Session object most likely is no longer active when you're trying to log the value because it occurs after the process class is done processing.

So, if you want to do this you have to track this value yourself. You can:


  • In your process class OnProcessInit() after InitSession() Server.oResources.AddIcActiveSession = Session.cSessionId

    FUNCTION OnProcessInit() THIS.InitSession("MyApplication") Server.oResources.Add("ActiveSessionId") = Session.cSessionId ENDFUNCT

  • Then modify your logging routine to log the ActiveSessionId property from the Log method
    lcSessionId = THIS.oResources.Item("ActiveSessionId") IF ISNULL(lcSessionId) lcSessionId = "" ENDIF

+++ Rick ---


Dear friends,
I would like to track users activities with data from wwSession.dbf and wwRequestLog.dbf. I tried to add a new SessionId field into wwRequestLog.dbf but I do not understand how to get SessionId value in wwServer.LogRequest function:

INSERT INTO (THIS.cLogFile) ; (TIME, QueryStr ,REMOTEADDR, Duration,Error,Script,MemUsed,ReqId,SessionId) ; VALUES (DATETIME(), ; lcParameter ,; lcRemoteAddress,; lnSeconds,llError,; lcExecutable,; SYS(1016),; lcReqId,; SessionId)

If I create a wwSession object just before INSERT I see the oSession.cSessionId property empty.
How to see wwSession object from wwServer?
I would like to use this solution rather add a new function writing SessionID and users data at every hit, because I am afraid to slow the web application.
Thank you very much



Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii

Viewing all articles
Browse latest Browse all 10393

Trending Articles