locked
Find the status of the logged users in a domain in ASP.NET. RRS feed

  • Question

  • User724169276 posted

    Hello,

    I have a requirement to create an ASP.NET application which will let a domain admin know about the number of online users under him.By the word online users means ,if the person is locked his workstation or logged-off , these kind of details.I am completely blank at this point.Please share some ideas about how to approach ?

    MODERATORS: Before deleting i request you to give a reason behind deletion.

    Wednesday, November 5, 2014 5:11 AM

Answers

All replies

  • User571301025 posted

    i'm not aware about these kind of techniques. Hope that it is also not possible, since system lock/logged-off can be done by the user, hope that browser don't get any chance to

    identify that event. :)

    Wednesday, November 5, 2014 6:55 AM
  • User724169276 posted

    hope that browser don't get any chance to

    identify that event.

    OfCourse its not possible to do so directly from web application.I have found a batch file which will help me to give the status of the users.

    @echo off
    for /f %%a in (pcList.txt) do (
    echo ********************
    echo Host: %%a
    echo ********************
    For /F "Tokens=2* Delims==\" %%i In (
    'WMIC /Node:%%a ComputerSystem GET UserName /Value^|Find "="'
    ) Do Echo Current Logged in User ID for %%a is: %%j
    )
    echo ********************
    echo Sweep is Complete
    echo ********************
    pause

    in above code pcList.txt is the file containing the ip address of the users in that domain.But how to get that status from batch file in web application is the problem.

    Wednesday, November 5, 2014 7:01 AM
  • User571301025 posted

    Hope that you can write the output of the batch file to a text file (For that you can use Redirect opeators) and read it thru your web application.

    http://pcsupport.about.com/od/commandlinereference/a/redirect-command-output-to-file.htm

    Wednesday, November 5, 2014 7:18 AM
  • User753101303 posted

    Hi,

    http://msdn.microsoft.com/en-us/library/bb404664(v=vs.90).aspx is how WMI can be used from dotnet (and you would have to be able to connect to all workstations to check for that ??) . Another option could be the presence indicator found in IM products or have the logon/logoff script to write the info to a file (not sure for the locked screen).

    Double check it really make sense (not sure about the context but what if a user is just away for a meeting or whatever?). It seems quite a poor way to "manage" staff activities...

    Wednesday, November 5, 2014 7:40 AM
  • User724169276 posted

    WMI can be used from dotnet

    i was expecting this WMI, its a whole now world, anyways ,will try to do it.

    Another option could be the presence indicator found in IM products or have the logon/logoff script to write the info to a file (not sure for the locked screen).

    Whats presence editor ? I didn't get this line ?

    Double check it really make sense (not sure about the context but what if a user is just away for a meeting or whatever?). It seems quite a poor way to "manage" staff activities...

    Its actually for Customer executives who are willing to take a break, at that time admin should be able to see that whos on break or who is logged off .. etc etc.

    Wednesday, November 5, 2014 7:54 AM
  • User753101303 posted

    I was thinking about reusing something such as http://technet.microsoft.com/en-us/library/lync-online-instant-messaging-presence-and-contacts.aspx depending on what you have at your company (you likely have that in most instant messaging products). http://en.wikipedia.org/wiki/Presence_information might also perhaps help.

    Not sure also if users are supposed to interact with this same web app or if this is just a monitoring tool (in the first case, you could use the last user http request date/time as a "presence indicator").

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 5, 2014 8:18 AM
  • User1316246260 posted

    There is a method of Timers:

    Place a timer in each website of fixed length.

    Then  have a master of the with a timer of same fixed length.

    Every website timer that falls into the master timer time span is online.

    Another method is using WCF from Visual Studio which may be easier. 

    Wednesday, November 5, 2014 8:31 AM
  • User724169276 posted

    I was thinking about reusing something such as http://technet.microsoft.com/en-us/library/lync-online-instant-messaging-presence-and-contacts.aspx depending on what you have at your company (you likely have that in most instant messaging products). http://en.wikipedia.org/wiki/Presence_information might also perhaps help.

    That's a nice article , but it has explained theoretically ,but how shall i start the implementation ? Undecided

    Not sure also if users are supposed to interact with this same web app or if this is just a monitoring tool (in the first case, you could use the last user http request date/time as a "presence indicator").

    Its just a monitoring tool for the team leader.

    Wednesday, November 5, 2014 8:37 AM
  • User724169276 posted

    There is a method of Timers:

    Place a timer in each website of fixed length.

    Then  have a master of the with a timer of same fixed length.

    Every website timer that falls into the master timer time span is online.

    This doesn't make any sense.If you can elaborate exactly what you mean by that type of implementation?

    Wednesday, November 5, 2014 8:38 AM
  • User724169276 posted

    i got a question patrice.WMI runs on a powershell only no aspx??Any alternatives ?

    Wednesday, November 5, 2014 8:44 AM
  • User724169276 posted

    Anyone ?

    Thursday, November 6, 2014 3:12 AM