Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

NAV 2016 - Limit User Sessions

$
0
0
Hi,

I have recently implemented this code in an Event Subscriber, subscribing to the OnBeforeCompanyOpen event.
The aim is to limit RTC users to one session, as we believe users opening multiple sessions may be having some impact on performance.
IF (SESSION.CURRENTEXECUTIONMODE = EXECUTIONMODE::Standard) AND (SESSION.CURRENTCLIENTTYPE = CLIENTTYPE::Windows) THEN BEGIN
  ActiveSession.SETRANGE("User ID",USERID);
  ActiveSession.SETRANGE("Client Type",ActiveSession."Client Type"::"Windows Client");
  IF ActiveSession.COUNT > 1 THEN
    ERROR(ErrTooManyOpenSessions);
END;

Today whilst testing we ran into a problem. If a users session crashes, and they end the task session with Task Manger, it seems the session is not cleaned up. So therefore the user is left with no session open, but they are unable to access the RTC until someone cleans that session up.

I am wondering if anyone has any suggestions on how to handle this? Or is there an even better way to handle this?

Thanks in advance.
Nick

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>