NAV 4 native database (without job scheduler). No NAS neither.
Any ideas on how to kill nav user sessions without buying additional granules?
Possible ideas:
- disconnect user from network (would user session be killed, or would it remain on nav?)
- write a report that would kill inactive sessions and run it manually when needed (but here, when you need to log on in nav, and there is not enough sessions left, you will not be able to run that report)
- any other ideas?
0
Comments
Look at this
http://www.mibuso.com/forum/viewtopic.p ... e+codeunit
Users that have Idle timeout field empty, run CU in single instance. See better solution (if possible) at the end of post.
Added field in T:91
Field No. Field Name Data Type Length Description
69002 Idle Timeout Duration
Add code in CU:1, in LoginStart
It is better to use NAS, since every minute session idle time is reset to zero.
Using NAS idle time of user is not affected.
However, ideas outside of navision doesn't seem to be right.
Dynamics NAV Enthusiast
But you must left Idle time blank only on users that are working all the time and set Idle time for users that are "distressed" and continuously leave session active.
Forgot to mention, you must add read/delete permission on table Sessions.
You have another way to solve timings.
You can dedicate one user to do disconnects. Use windows Authentication and start fin.exe with Task scheduler. Add wsh script (sendkeys) at the end to close client.
But if no session is available, then the client will stop at error and will not close. Using shell command tasklist /kill (or pslist /kill) before running task will solve that problem.
Thanks. I will try both of your suggested solutions.
Dynamics NAV Enthusiast
If you test with same username it won't work.
At least one user should do disconnects and others should not.
I've tried 1st solution.
But the problem is how can I access to Session Table?
The code unit works, but it doesn't kill the session. I think it is because I didn't do anything with the "Session" table.
Please, advice
Amaraa
another option is ExpandIT Client Control: http://www.expandit.com/templates/expan ... log_id=634
But you have to pay for that...
Regards,
Josetxo
I tried it in one customer and runs well. Is easy to configure and manage.
Bye.
I know there is a tool ExpandIt. But I don't want to pay for this if it is can be done (not so difficult to programm).
I guess there is a solution.
Regards,
Amaraa
ps . sometimes paying for a working solution is far worth the headache of coming up with one.
you'll have to weigh the costs
sql sheduler nas outside program
your call**edit : What the list thingy doesn't work? :-k
http://www.BiloBeauty.com
http://www.autismspeaks.org
Amaraa are you an End User or a Partner.
If you are a customer, then you need to understand that people can't develop professional business solutions for free. These products have to be developed tested and supported. If you are a partner, then you need to consider if you are doing your customer a justice. The cost for you to research and analyze then code and test this solution will be far more than the cost of purchasing a ready made product. In the time you waste (and bill the client) for this you could be doing actual business related Navision work.
I'm a partner.
And the customer asked to have a tool for auto disconnecting idle users. So, your recommendation is to suggest to the customer buying a tool for that.
I will talk about it with them.
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;