Determining an 'active' user count of an ASP.NET site

后端 未结 9 2104
南旧
南旧 2021-01-01 01:36

On an ASP.NET site, what are some techniques that could be used to track how many users are logged in to the site at any given point in time?

So for example, I could

9条回答
  •  余生分开走
    2021-01-01 02:16

    There are performance monitor stats for Sessions Active within the ASP.NET performance objects, and you can track all instances, or individual apps. You can access these stats through Admin ToolsPerformance, or programmatically via WMI.

    A very basic PowerShell script to get such a total of such counters:

    (Get-WmiObject Win32_PerfRawData_ASPNET_ASPNETApplications SessionsActive).SessionsActive
    

    A filter should be able to get the stat for a specific site.

提交回复
热议问题