By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,463 Members | 771 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,463 IT Pros & Developers. It's quick & easy.

ASP.NET performance counters not updating

P: n/a
Hi

Has anybody had any experience of ASP.Net performance counters not updating.

In the performance monitor application when I try to add the groups ASP.NET
and ASP.NET Applications the counters all show 0. In addition, ASP.NET
Applications does not show any of the ASP.NET instances that are running on
the computer. The other counters for example % processor time work fine.
The problem machine is a test server running Win2003. Security rights
should not be a problem as I have tested in the administrator role and get
the same result. I have less than 113 apps / domains running on IIS so not
an issue relating to the hotfix released by Microsoft.

I have searched the web looking for a solution and have tried the following.
Resetting WMI, rebuilding performance counters and uninstalling and
reinstalling ASP.NET using aspnet_regiis.exe but still have the same
problem.
Has anybody come across this before, any ideas?
Thanks

James
Nov 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hi James,

Welcome to ASP.NET newsgroup.
From your description, you found the performance counters for ASP.NET
applications doesn't display correctly on your win2k3 server machine, yes?

As far as I knew, there didn't has any othe existing issue on the
performance counters for ASP.NET applications. Also, I feel a bit strange
since you said that the counters on your 2003 server didn't list any of the
running asp.net apps on it. I think we can still try the following things:

1. Visit some of your ASP.NET web apps on the server so as to start them
and then in the Task manager to ensure that the W3WP process has started.

2. Open the Perfmon and choose the "ASP.NET v1.1.4322" and select the
"Appication running" counter to add. Then look the counter's value to see
whether the "Last" or the "Max" value represent the correct running
applicaiton's count.

3. If the above counter can display well, that means the perfmon did
correctly represent the applicaitons running on the server. Then, switch
to "ASP.NET Applications" category and choose the "Select instances from
list" option to see whether the listbox can correctly list all the existing
running instances on the server.

In addition, we can also create a simple .net app (console or desktop) to
programmatically access the performance counters to check the values.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #2

P: n/a
Steven,

many thanks for your help, please see below for responses to your
suggestions.

1. Visit some of your ASP.NET web apps on the server so as to start them and
then in the Task manager to ensure that the W3WP process has started.

Once I have opened some ASP.NET Web Apps I have two W3WP processes showing
in Task Manager (one as System one as Network Service). After interacting
with the ASP.NET application the W3WP process running as Network Service
shows processor activity. So far this seems normal to me.
2. Open the Perfmon and choose the "ASP.NET v1.1.4322" and select the
"Appication running" counter to add. Then look the counter's value to see
whether the "Last" or the "Max" value represent the correct running
applicaiton's count.

Opened perfmon added "Applications Running" counter from "ASP.NET v1.1.4322"
group. Still shows zero for "Last", "Max" and the other variables. I have
tried loading additional ASP.NET Applications in IE but counter still shows
zero.

3. If the above counter can display well, that means the perfmon did
correctly represent the applicaitons running on the server. Then, switch to
"ASP.NET Applications" category and choose the "Select instances from list"
option to see whether the listbox can correctly list all the existing
running instances on the server.

No instances are showing in the "ASP.NET Apps v1.1.4322" or "ASP.NET
Applications" groups besides the _Total_ option.
4. In addition, we can also create a simple .net app (console or desktop) to
programmatically access the performance counters to check the values.

I have used Microsoft Application Center Test (ACT) tool running from my
development machine (XP Pro) to test some of the applications running on the
Windows 2003 server. ACT runs fine and performs as you would expect.
However when I add performance counters I get the same issue it works fine
for the other counters eg % processor time, but all ASP.NET counters just
show zero! From this I don't think it a permon related issue but rather
something to do with the ASP.NET counters unless ACT uses perfmon in the
background to collect counter information.

I also tried killing the other W3WP process running under System to see if
that would make any difference, as I thought maybe the performance counters
were somehow tied into the wrong process but I still get same results.

Any other suggestions you might have would be be appreciated.

Thanks,
James

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:pr**************@TK2MSFTNGXA01.phx.gbl...
Hi James,

Welcome to ASP.NET newsgroup.
From your description, you found the performance counters for ASP.NET
applications doesn't display correctly on your win2k3 server machine, yes?

As far as I knew, there didn't has any othe existing issue on the
performance counters for ASP.NET applications. Also, I feel a bit strange
since you said that the counters on your 2003 server didn't list any of
the
running asp.net apps on it. I think we can still try the following
things:

1. Visit some of your ASP.NET web apps on the server so as to start them
and then in the Task manager to ensure that the W3WP process has started.

2. Open the Perfmon and choose the "ASP.NET v1.1.4322" and select the
"Appication running" counter to add. Then look the counter's value to see
whether the "Last" or the "Max" value represent the correct running
applicaiton's count.

3. If the above counter can display well, that means the perfmon did
correctly represent the applicaitons running on the server. Then, switch
to "ASP.NET Applications" category and choose the "Select instances from
list" option to see whether the listbox can correctly list all the
existing
running instances on the server.

In addition, we can also create a simple .net app (console or desktop) to
programmatically access the performance counters to check the values.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #3

P: n/a
Hi James,

Thanks for your response.
After some further research, I've found some former issue which had the
similiar symptom as your problem. The potential cause is that the worker
process of the ASP.NET application didn't have the proper permission to
write entry into the perf counters( can't update it). To verify this,
would you please try the following things:

#Choose 2 -3 of the asp.net applications running on your server:

1. Make sure they're not using impersonation. Check the process Idenitity
they are running under.(in the IIS's application pool setting). By default
it should be NetworkService, if so, change it to Local System account and
recycle IIS and visist those applications. Check the perf monitor to see
whether the perf counters behave correctly

2. If the above change can work, we can confirm that the problem is
concerned with asp.net 's default process identity. By default
NetworkService account should have the correctly permission to update the
perf counters.

Anyway, please have a look at the above things first and let me know if
there're any new updates.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4

P: n/a
Steven,
you are a genius it worked!

I changed the process identity to Local System and the ASP.NET counters are
updating. So for some reason it looks like the Network Service account does
not have the correct permissions to update the performance counters. I am a
bit surprised that the event log did not show any warnings about the Network
Service account having insufficient permissions when trying to write to the
performance counters.

I will change the application pool settings back to the way they were and
try and assign the correct permissions to Network Service. Will let you
know how I get on.

Thanks again,
James
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:VF**************@TK2MSFTNGXA01.phx.gbl...
Hi James,

Thanks for your response.
After some further research, I've found some former issue which had the
similiar symptom as your problem. The potential cause is that the worker
process of the ASP.NET application didn't have the proper permission to
write entry into the perf counters( can't update it). To verify this,
would you please try the following things:

#Choose 2 -3 of the asp.net applications running on your server:

1. Make sure they're not using impersonation. Check the process Idenitity
they are running under.(in the IIS's application pool setting). By
default
it should be NetworkService, if so, change it to Local System account and
recycle IIS and visist those applications. Check the perf monitor to see
whether the perf counters behave correctly

2. If the above change can work, we can confirm that the problem is
concerned with asp.net 's default process identity. By default
NetworkService account should have the correctly permission to update the
perf counters.

Anyway, please have a look at the above things first and let me know if
there're any new updates.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #5

P: n/a
Hi James,

Thanks for your reply and glad that my suggestions were of assistance.

Switching the process identity to Local System is just to verify that the
problem is caused by unsufficient permission of the asp.net's executing
identity(we are not recommended to run asp.net under localsystem). By
default the NetworkService Account which is in the IIS_WPG group should
also have the sufficient permissions to update Perf counters. If you're not
using impersonation and your web app running under Networkservice account
can't update perf counters, there must has something incorrect with your
server's security setting. To adjust the security access permission, you
can follow the guide in the below kb article:

#Performance counters may have inaccurate results when a user without
permission runs the ASP.NET worker process
http://support.microsoft.com/?id=841554

Hope also helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #6

P: n/a
Steven,

I tried using the technique outlined in the article you included, but I
could not add the Network Service account to the IIS_WPG group. I think
this is because the server is also a domain controller, see link for more
information.

http://groups.google.co.uk/group/mic...56fc024dab3b42
As this is just a internal test environment I will probably just leave it as
it is. When I need to do any stress testing using the ACT tool I will
change the application pool identity to Local System and then change it back
again. If the application is deployed it will be deployed to a non domain
controller server so hopefully the issue will not be present.

Anyway thanks again for all the help.

Cheers,
James

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:WW**************@TK2MSFTNGXA01.phx.gbl...
Hi James,

Thanks for your reply and glad that my suggestions were of assistance.

Switching the process identity to Local System is just to verify that the
problem is caused by unsufficient permission of the asp.net's executing
identity(we are not recommended to run asp.net under localsystem). By
default the NetworkService Account which is in the IIS_WPG group should
also have the sufficient permissions to update Perf counters. If you're
not
using impersonation and your web app running under Networkservice account
can't update perf counters, there must has something incorrect with your
server's security setting. To adjust the security access permission, you
can follow the guide in the below kb article:

#Performance counters may have inaccurate results when a user without
permission runs the ASP.NET worker process
http://support.microsoft.com/?id=841554

Hope also helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #7

P: n/a
You're welcome James,

Since your server is a DC, that's really a particular scenario since
generally asp.net app is not recommended to be hosted on a DC box. Also,
Networkservice account is by default in the IIS_WPG group. Anyway, due to
your particular condition, it's ok to let it works just as you mentioned.

Thanks again for your posting. Good luck!

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.