Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to Enumerate ISA Sessions


View products that this article applies to.

This article was previously published under Q315843

↑ Back to the top


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.

↑ Back to the top


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

File NameSize
EnumSessions.cpp 2,301 bytes
EnumSessions.dsp 4,389 bytes
EnumSessions.dsw 547 bytes

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 = "Active sessions:" & vbCrLf

Set objFPC = CreateObject("FPC.Root")
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 "No active sessions"
End If
				

↑ Back to the top


References

ISA SDK Enumsessions

↑ Back to the top


Keywords: KB315843, kbfile, kbdownload, kbhowto

↑ Back to the top

Article Info
Article ID : 315843
Revision : 4
Created on : 8/5/2004
Published on : 8/5/2004
Exists online : False
Views : 326