user session & disconnect asp

Discussion in 'ASP General' started by weiwei, Nov 15, 2005.

  1. weiwei

    weiwei Guest

    Hi:
    I am trying to write a web function to display all the user's session
    which logon to the server. my current asp script
    doesn't work, however, the problem is even myself only is login to the
    server (no one else) my asp script shows duplicate
    usernames, how can I make it only one instead of two, the other
    question is how can force user log off from asp scripting,
    I am trying to search on the web, but no much success, any help will be
    helpful, thanks in advance.. (below is my current
    code)

    <% ip = "xx.x.xxx.xx" %>

    <% Set objDC = GetObject("WinNT://mydomain/" & ip & "/LanmanServer") %>

    <% For Each objSession In objDC.Sessions %>

    <%=objSession.User%><br>

    <% Next %>

    <% Set objSession = Nothing %>
    <% Set objDC = Nothing %>
     
    weiwei, Nov 15, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ad
    Replies:
    0
    Views:
    501
  2. farseer
    Replies:
    7
    Views:
    896
    Esmond Pitt
    Apr 23, 2005
  3. Boki
    Replies:
    1
    Views:
    1,100
  4. Remon van Vliet

    Disconnect causing READ_OP?

    Remon van Vliet, Jun 14, 2005, in forum: Java
    Replies:
    22
    Views:
    1,469
  5. mkhmer
    Replies:
    1
    Views:
    370
    Shawn Wildermuth (C# MVP)
    Jul 17, 2006
Loading...

Share This Page