Tracking client machine
-
hi, i have a question that ,how we can track the client machine..like say example i have a web application which my clients have access to it and i want to treck some how .. that user are active or not with his activity.. means here server can track their users every time ... is it possible here in asp.net ... and also can we treck that user where user had closed that web application or system crash.. so how can i know that this user are no longer active with this application. Deepak Gedia
-
hi, i have a question that ,how we can track the client machine..like say example i have a web application which my clients have access to it and i want to treck some how .. that user are active or not with his activity.. means here server can track their users every time ... is it possible here in asp.net ... and also can we treck that user where user had closed that web application or system crash.. so how can i know that this user are no longer active with this application. Deepak Gedia
Deepak Gedia wrote:
and also can we treck that user where user had closed that web application or system crash.
You need to use combination of session and application variables in
Global.asax
or in anyHTTPModule
. When user closes browser, no event will be fired on server. You can track session out fromsession_end
event. This event will be fired whenSession.Abandon()
is called or when Session times out. So keep an Application variable that holds Active users. When new sessions are created,Session_Start
event will be fired. Inside this event you need to increase the application variable count. Application variable count should be decremented whensession_end
fires. To get active users print Application variable.
-
Deepak Gedia wrote:
and also can we treck that user where user had closed that web application or system crash.
You need to use combination of session and application variables in
Global.asax
or in anyHTTPModule
. When user closes browser, no event will be fired on server. You can track session out fromsession_end
event. This event will be fired whenSession.Abandon()
is called or when Session times out. So keep an Application variable that holds Active users. When new sessions are created,Session_Start
event will be fired. Inside this event you need to increase the application variable count. Application variable count should be decremented whensession_end
fires. To get active users print Application variable.
thnx for replying ... but what happens when the system crashes. at that time i dont think so the Session_End Event fires .... how can i treck that see i am developing an time tracker application for the internal employees in asp.net the thing is that the user logs in but some how if they close the window or application crashes or machine how i can set that users logout time .. thats the problem i am facing i even tryed out for the push architecture but .. didnt get the response much..
-
thnx for replying ... but what happens when the system crashes. at that time i dont think so the Session_End Event fires .... how can i treck that see i am developing an time tracker application for the internal employees in asp.net the thing is that the user logs in but some how if they close the window or application crashes or machine how i can set that users logout time .. thats the problem i am facing i even tryed out for the push architecture but .. didnt get the response much..
Deepak Gedia wrote:
but what happens when the system crashes. at that time i dont think so the Session_End Event fires .... how can i treck that
Which system crashes ? Client machine or Server. If client machine crashes, immediately session_end won't be fired. It will be fired when session end for the user. By default it will be 20mins. After that it will fire session_end event. But if server machine is crashing, I am sorry not even session_end, nothing will be fired.
Deepak Gedia wrote:
the thing is that the user logs in but some how if they close the window or application crashes or machine how i can set that users logout time
Same way what I told in the previous posts. To understand how session and it's event works, better take a good ASP.NET book and learn. Happy Programming