Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

List Active Session


#1

Is there a way of listing all session currently active?

I am starting our with Smart Inspect and so far find it very useful. I am setting up one session per DLL in our website and am trying to write a page that would show me their current state: color, active, etc. I would prefer to query the list of session names, rather than know what they are and risk someone adding one without updating the page, but I can’t find a ienumerable of session. I am loading the session from a database, and setting the bool store to true, but that doesn’t prevent someone from taking a shortcut and adding a session on the fly.

Thanks
Randy


#2

Hello Randy,

Thanks for your posting! There’s currently no option to get all sessions from the SmartInspect object and I would recommend adding all sessions in a single location in your case (so, discourage the usage of AddSession anywhere else in the code). If you have a log file you would like to analyze, you can simply use the built-in AutoView rules to generate a separate view for each session in the log file (Edit | Apply Builtin AutoView Rule | Session.

Regards,
Tobias