user session & disconnect asp

W

weiwei

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 %>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top