StrataFrame Forum

check active user login and kick user out from system

http://forum.strataframe.net/Topic30708.aspx

By Diu King,Tiong - 12/12/2011

Hi all,

I want to check whom user are log in to the system and next step i want to kick them out from system.
I want to know how strataframe manage to do it for this situation.

please advice



USING (VB.NET 2010/SQL SERVER 2008)
By Ivan George Borges - 12/12/2011

Hi Tiong.

When you say system, are you talking about your application? If so, you can find out many properties about the CurrentUser using the MicroFour.StrataFrame.SecurityBasics.

As for kicking him off, there are many things to be considered like closing all forms nicely and so on. But I guess you will end your application and for that you could use END, Environment.Exit(-1) or even System.Windows.Forms.Application.Exit(), depending on the kind of application you are talking about.
By Diu King,Tiong - 12/13/2011

HI Ivan,

can i detect all who are the users access to the system within same network?
By Edhy Rijo - 12/13/2011

Hi Tiong,


Diu King,Tiong (12/13/2011)
can i detect all who are the users access to the system within same network?


There is nothing in SF that will do that.  What I do is I have my own LoggedUsers table which I update when user log in/out and then I can know which one are logged.  I know it is not perfect in case the application crash, but so far SF framework is so stable that I have not had any crash notification by my users. Smile
By Diu King,Tiong - 12/13/2011

Hi Edhy,

Get your mean and thanks
By Ivan George Borges - 12/13/2011

Yep, that is one way of doing it, but as Edhy said, if your application crashes you will end up with wrong information. If you guys decide to stay with the "table" solution, maybe you could implement a timer on the application that would keep saving the current time to the logon record every, let's say, 30 seconds. Then you could write a service application that would also have a timer checking that same table and deleting the records which "time" column were older than a minute or something like that. So if your application crashes and stop updating its logon record, the service will take care of it. Of course your machines would have to be with their clocks synchronized.

Over here I have implemented the chat like solution, where the service application talks to the workstations and keep a list of alive logged users. Here is a good thread to give you some ideas:

http://forum.strataframe.net/FindPost21310.aspx
By Diu King,Tiong - 12/15/2011

Thanks Ivan for you sharing
By Ivan George Borges - 12/15/2011

You're welcome. Cool