How to fiind the IDle time.

kgsinhakgsinha Member Posts: 67
Hi everybody,,,,

I have to generate a code which will check the Idle Time (total of the time, when user is not using the navision) of the user. And kill the session of the user if it goes above thatn Idle time defined.


As i found that, when user is in log in mode; all information is maintained in "SESSION" table (virtual table). But now i can't understand what to do firther to achive the above goal...

PLEASE HELP

Comments

  • kinekine Member Posts: 12,562
    You need to read the Session table, find the user who is over limit, and kill him :-) (delete the record from the table :wink:) 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kgsinhakgsinha Member Posts: 67
    that i want to know....
    how i will come to know that user is over limit....
    during login mode , i see that "idle time" filed of session table.is not having any value .

    Please give the step wise solution if possible...
  • kinekine Member Posts: 12,562
    Of course, because if you look at your session, you are active by this "looking"... (you are 0 seconds inactive) :-) there must be another process which will tell that this user is over limit (e.g. Application server)... It is common "problem of uncertainty" (I do not know terminus technicus) - when you influence the object you are observing... :-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • krikikriki Member, Moderator Posts: 9,110
    kine wrote:
    Of course, because if you look at your session, you are active by this "looking"... (you are 0 seconds inactive) :-) there must be another process which will tell that this user is over limit (e.g. Application server)... It is common "problem of uncertainty" (I do not know terminus technicus) - when you influence the object you are observing... :-)
    The Heisenberg uncertainty (http://en.wikipedia.org/wiki/Uncertainty_principle).
    :D
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • nunomaianunomaia Member Posts: 1,153
    kgsinha wrote:
    that i want to know....
    how i will come to know that user is over limit....
    during login mode , i see that "idle time" filed of session table.is not having any value .

    Please give the step wise solution if possible...

    Aren’t you referring to TCP timeout defined in Windows? Navision doesn’t have a timeout.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • David_SingletonDavid_Singleton Member Posts: 5,479
    kine wrote:
    ... It is common "problem of uncertainty" (I do not know terminus technicus) - when you influence the object you are observing... :-)

    Schrodinger's Cat. :mrgreen:
    David Singleton
  • jonsan21jonsan21 Member Posts: 118
    Hi,

    Which version you're using? Version 4.0 there's Idle Time in the session table.

    Rgds,

    Jon.
    Rgds,

    Jon.
  • todrotodro Member Posts: 117
    kgsinha wrote:
    that i want to know....
    how i will come to know that user is over limit....
    during login mode , i see that "idle time" filed of session table.is not having any value .

    Please give the step wise solution if possible...
    simply reference the virtual session table and use the field "idle time". You can verify this by running a server from the command line and connecting 2 sessions, then create a new form with the session table and run it. Depending on the client you are running this form from, you will see that the "My Session" has always a duration of 0, the other session will start to increase the idle time until there is some activity in this session:

    To run the server:
    server.exe database=i:\40SP3\database.fdb,servername=localhost,cache=32000,nettype=TCP
    

    then simply connect two clients, change the protocol in the open dialog to TCP and chose localhost as the server.

    Beware, the field is of type DURATION, so its your decision to either use a timeout of 60seconds, 30minutes or 5hours when you compare the idle value. Therefore, there has to be a client or NAS running, generally speaking some kind of job spooler / scheduler, which will periodically, e.g. every minute, compares the sesion idle time values against a max. idle value, either a global or a user-individual one. If it's over, the session can be deleted.
    Torsten
    MCP+I, MCSE NT, Navision MCT (2004,2005)
Sign In or Register to comment.