I recently had to do some performance and stress tests on a Sitecore 6 website. But no matter what I did, the Perfmon showed 0 sessions.
At first I blamed the built in session handling in Sitecore, where Sitecore persists the Shell users. But the solution was elsewhere.
In order to measure sessions you must add the Session_Start and Session_End functions to the global.asax:
<%@ Import namespace="Sitecore"%> <%@ Import namespace="Sitecore.Diagnostics"%> <%@ Application Language='C#'%> <script runat="server"> public void Application_Start() { } public void Application_End() { } public void Application_Error(object sender, EventArgs args) { } public void Session_Start(Object sender, EventArgs e) { } // Add this to your global.asax public void Session_End(Object Sender, EventArgs e) { } // Add this to your global.asax </script>
There is no need to fill anything into the functions. They just have to be there. After this I could measure the sessions with Perfmon.
UPDATE: This is actually not a Sitecore 6 issue but a general .NET issue. It is not even a bug but expected behaviour. .NET will not instantiate the session object if no one uses it. This is a pretty clever way of saving memory.
When adding the Session_Start() and Session_End() events in the global.asax, the auto event wireup will automatically force an instantiation of the session object, making the .NET process store session data.