Microsoft KB Archive/315843

= How to Enumerate ISA Sessions =

Article ID: 315843

Article Last Modified on 8/5/2004

-

APPLIES TO


 * Microsoft Internet Security and Acceleration Server 2000 Standard Edition

-



This article was previously published under Q315843



SUMMARY
You can enumerate all active sessions of the Internet Security and Acceleration Server 2000 (ISA) in a program that is written in C++. The Enumsessions.exe sample demonstrates how you can perform this task. This sample must be built and run on the ISA computer.



MORE INFORMATION
To enumerate all active firewall and Web sessions, all arrays and all servers in each array must be enumerated. The following file is available for download from the Microsoft Download Center:

Download Enumsessions.exe now

Release Date: Oct-23-2002

For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file. The Enumsessions.exe (or file.hqx) file contains the following files:

Microsoft Visual Basic code similar to the following code sample can be used. For simplicity, the following code uses first server of the first array. You must add Mffpccom.dll in the project references:

Dim objFPC As FPCLib.FPC Dim server As FPCServer Dim session As FPCWebSession Dim firewallsessions As FPCFirewallSessions Dim firewallsession As FPCFirewallSession Dim websessions As FPCWebSessions Dim objFPCArray As FPCArray Dim szMessage As String szMessage = &quot;Active sessions:&quot; & vbCrLf

Set objFPC = CreateObject(&quot;FPC.Root&quot;) Set objFPCArray = objFPC.Arrays(1) Set server = objFPCArray.Servers(1) Set websessions = server.websessions Set firewallsessions = server.firewallsessions

For Each session In websessions szMessage = szMessage & session.UserName _ & vbCrLf Next For Each firewallsession In firewallsessions szMessage = szMessage & firewallsession.UserName _ & vbCrLf Next If (websessions.Count > 0) _ Or (firewallsessions.Count > 0) Then MsgBox szMessage Else MsgBox &quot;No active sessions&quot; End If

