Retrieve User Session count of Web Application
I was wondering if anyone knew how to or if it is even possible to get a web application user session count?
I can get that session count at the Web Site level by doing
Get-Counter "\\$ServerName\web service($website)\current connections"
Since our web site host an n number of web applications, a user connected to the site but using a specific application, so I would like to know what app they are actually using, is this possible?
January 30th, 2015 11:55pm
January 31st, 2015 12:59am
This might also work. It works on WS2008R2
$ServerName =$env:computername
$SiteName = 'default web site'
get-counter "\\$ServerName\web service($SiteName)\current connections"
January 31st, 2015 1:04am
This might also work. It works on WS2008R2
$ServerName =$env:computername
$SiteName = 'default web site'
get-counter "\\$ServerName\web service($SiteName)\current connections
February 3rd, 2015 8:29am
Sessions are at the site level. An application is a service to a site or web so I don't see howthat canbe done. THe IIS forum might have a way but the question has been asked with no answer that I can find for years.
February 3rd, 2015 1:00pm
Yeah I posted over there also, just in case. It doesn't seem like it is a possibility at the application level like you said and from what I have researched, but we will see, well at least using PowerShell.
Only way I can see it done, is through the web application itself, to create a static variable in the Global.ascx file, and increase it during the session_start event or decrease it during the session_end event, but since I don't own these applications, that
is not possible :-)
February 3rd, 2015 1:08pm
Did you check to see if perf counters have been added to the app pool. I don't remmeebr them at IIS7 but haven't look at 2008R2 iIIS 7.5 or later,
February 3rd, 2015 1:19pm
I have not, but will do some searching
February 3rd, 2015 1:22pm
Start with this:
Get-Counter -ListSet ASP*|select countersetname
Get-Counter -ListSet ASP* | select -expand counter|?{$_ -match 'session'}
February 3rd, 2015 5:24pm
Hi Clayman2,
Im writing to just check in to see if the suggestions were helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up.
If you have any feedback on our support, please click here.
Best Regards,
Anna Wang
TechNet Community Support
February 10th, 2015 12:56am
No reply from the IIS forum, and from everything I tried searching with, it doesn't look like this can be done at the level I want it to be.
February 11th, 2015 12:16am