we have an IIS web farm (two servers at the moment) set up to use SQL ASP State for the Session info. When I query the ASP State database table I can see the number of sessions being managed by the database.
Is there an associated Performance monitor that I can use to get the same information or is the best way to do it via a SQL Query?
I've tried setting up perfmon on the Web servers and the SQL Server and monitored everything that even sounds like Session, including:
\\WebServerA\ASP.NET Apps v2.0.50727(__Total__)\Session SQL Server connections total
\\WebServerA\ASP.NET Apps v2.0.50727(__Total__)\Sessions Active
\\WebServerB\ASP.NET Apps v2.0.50727(__Total__)\Session SQL Server connections total
\\WebServerB\ASP.NET Apps v2.0.50727(__Total__)\Sessions Active
\\WebServerB\ASP.NET State Service\State Server Sessions Active
\\WebServerB\ASP.NET v2.0.50727\State Server Sessions Active
\\SQLServer\ASP.NET Apps v2.0.50727(__Total__)\Session SQL Server connections total
\\SQLServer\ASP.NET Apps v2.0.50727(__Total__)\Sessions Active
\\SQLServer\ASP.NET State Service\State Server Sessions Active
All counters remain on 0 while running a performance test simulating 50 users, while at the same time I can see 50 sessions being created by querying the SQL session table.
Edit: The "Session SQL Server connections total" counters on the Web Servers do go up when the test is running, but it doesn't actually track the number of users (obviously, I know, but I was hoping for something)
Your best bet will be to query the SQL Server as this will be the most reliable information as the database is the authoritative source of this information at this point.
I've done a simlar search on http://msdn.microsoft.com/newsgroups and found the same answer there: How to count the active ASP.NET Sessions (SQL Server)?
It Seems that querying SQL is the only way to get this information. I suppose the only other way to do this would be to create a custom performance counter. I figure if that was a good idea, Microsoft would have simply created the counter?!? No?