How to determine Users connected to IIS on WinNT? Mark: I am afraid that would not work, because the LOGON_USER under the ServerVariables collection would work only for the current context that page was invoked. The question is not that. The question is to find out the logged in users of all websites. As one of the previous responses had alluded to the fact, that it is just not possible because HTTP by itself is sessionless and stateless and therefore to keep track of those sessions in Windows NT is not feasible, unless logins and logouts are tracked by someother repositing mechanism as database tables/log files, etc.
I am not sure, if there would be a method to collect the set of all ASPSESSIONIDs that the IIS would hold for all available sessions, that somehow might be mapped to the LOGON_USER for each ASPSESSIONID. In that case, you can find the LOGON_USERs. Else, we have to resort to a crude parsing of IIS Logs within a time-frame, I would guess. Thanks anyway, Rex From: Mark G. Franz To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 1:01 PM Subject: Re: How to determine Users connected to IIS on WinNT? You can call the VBScript method ServerVariables() inside a PerlScript to receive a number of different variables. Since I am no PerlScript master I cannot give any code examples, but is should be fairly simple; <%@ Language="PerlScript"%> <% $theUser = Request.ServerVariables("LOGON_USER") %> <%= $theUser %> Read here for all details on ServerVariables http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/html /psdk/asp/vbob5vsj.asp Mark ----- Original Message ----- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 7:24 AM Subject: How to determine Users connected to IIS on WinNT? I need to write a script that should be able to find out the users who might be logged on to the NT box via an IIS Server. The users might be autheticated via Basic Authentication, for any of the n websites operating out of IIS on the WinNT box. I would appreciate any pointers on how to approach this issue. Can I query 'some' metabase, that would give me the logged on users to the machine via IIS? When I run the Win32::Lanman::NetSessionEnum, I am not getting any info even though more than one user is logged on to NT box via IIS. Thanks in advance, Rex _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs