Session Kill
slowhandfan
Member Posts: 56
We have a customer licensed for just 4 users, 2 NAS's and 2 clients running SQL 2009R2. They wanted a session kill on a user for 30 miniutes of inactivity. I added some code (see below) to one of the NAS's that we use at other customers running versions 5.1 and 4.3. Code works great. Had an interesting side effect on 2009R2 SQL. After 30 minutes the Session record is deleted if the client was inactive. If 2 users were idle then both session records are deleted allowing another client to connect. The 2 idle sessions appear to the user to be active. When they touch their screen the session record is restablished with no apparent interruption. If both knocked off users touch their screen they are connected. We now have 5 active users (2 NAS and 3 Cleints) while the license clearly only allows 4. If one of the clients logs off they cannot get back in, they get the standard number of sessions exceeded. It seems like a huge license loop hole. If the session records are deleted through the NAS it allows other users to log on but then allows the active clients (whose sessons records were deleted) to re-establish another session record exceeding the license limit.
session.SETRANGE("My Session",FALSE);
session.SETFILTER(session."Application Name",'%1','Microsoft Dynamics NAV Classic client');
session.SETFILTER(session."Database Name",'%1','ECPNavision');
session.SETFILTER("Idle Time",'>30 min');
IF session.FIND('-') THEN BEGIN
session.DELETE;
MESSAGE('UserID %1 logged off for IDLE time', session."User ID"); // goes to event viewer
COMMIT;
END;
session.SETRANGE("My Session",FALSE);
session.SETFILTER(session."Application Name",'%1','Microsoft Dynamics NAV Classic client');
session.SETFILTER(session."Database Name",'%1','ECPNavision');
session.SETFILTER("Idle Time",'>30 min');
IF session.FIND('-') THEN BEGIN
session.DELETE;
MESSAGE('UserID %1 logged off for IDLE time', session."User ID"); // goes to event viewer
COMMIT;
END;
0
Comments
-
Search the forum with kill session..i am sure you will get lot of solutions..0
-
I don't really need a solution. The issue is more of a statement of fact that a loophole exists in the license. I am slightly intersted if this is just related to 2009R2 and SQL. In theory 2 users could log in, after 1 minute delete the seesion records, have more 2 more users log in. Now 4 users are using the system when the license only allows 2.0
-
Licensing is a legal restriction not a technical one. While some systems attempt to puit some sort of technical controls on licensing, the responsibility remains with the licensee. It is the licensee's responsibility to insure that unlicensed users are not on the system. Telling the judge "the system let us do it" is not a defense.There are no bugs - only undocumented features.0
-
It is also happening with 2009 and SQL 2005. It seems that system does not check license limit while reconnecting the client if session table is deleted manually or by NAS.
Works fine with version 5.10
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
