Session killing in NAV 2009

valanrvalanr Member Posts: 22
Dear Friends

For Dynamics Nav 6.0(2009) i am trying to delete the session table records with the code

gSession.SETFILTER("Idle Time",'>%1',Setup."Session Idle Time");
IF gSession.FINDSET THEN
REPEAT
gSession.DELETE;
COMMIT;
UNTIL gSession.NEXT =0;

The record count reduces from the session table but the NAV client doesnt closing like previous versions(4.0)

Its not allowing other user to enter in to the killed session

Can anyone suggest a solution to kill the idle session in NAV 2009?

Thanks in advance

Regards

Valan

Comments

  • kinekine Member Posts: 12,562
    I think that it is because the mid-tier is reconnecting the session. May be these settings from CustomSettings.config of the Service tier could be interesting:
    	<add key="ClientReconnectPeriod" value="00:10:00"></add>
    	<!--
          Sets the maximum number of orphaned connections to be kept alive 
          simultaneouly for a maximum time specified by the 
          ClientReconnectPeriod setting. A connection becomes an orphan when
          the client becomes involuntarily disconnected from the server.
      -->
    	<add key="MaxNumberOfOrphanedConnections" value="20"></add>
    	<!--
          Threshold for when to start compressing data sets to avoid that they 
          consume prohibitive amounts of memory.
      -->
    
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.