472,338 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,338 software developers and data experts.

ASP.NET performance counters not updating

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
7 4684
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Mitchell | last post by:
Hello group, I'm trying to write code to test an application we're developing. This application needs to store its own performance data in the...
2
by: ajjvn | last post by:
I 'inherited' a group of SQL Server server class machines. They are true server technology but the disk sub-systems are lacking. There is one...
0
by: rob_c | last post by:
Hi, I've been working with the EIF for a few days now. One of the default event sinks provided is the WMI. I've played around a bit and can...
2
by: Mark | last post by:
Hi... We're looking at moving an ASP app from IIS 5 to IIS 6. In general things seem to be working okay, but there are some oddities around the...
0
by: Christopher Attard | last post by:
Hi, I need to create a dialog like the 'Add Counters' dialog box in perfmon. I'm using the System.Diagnostics namespace class in .NET and I've...
19
by: Tom Jastrzebski | last post by:
Hello, I was just testing VB.Net on Framework.Net 2.0 performance when I run into the this problem. This trivial code attached below executed...
1
by: jvn | last post by:
I am experiencing a particular problem with performance counters. I have created a set of classes, that uses System.Diagnostics.PerformanceCounter...
1
by: Robert Strickland | last post by:
I have a .Net web service (written for 1.1 Framework using C#) running on Windows 2003 with all latest patches. To help monitor the service, the...
10
by: Zytan | last post by:
I made a program using the Timer class, and I start the timer with Timer.Start(), but don't stop it with Timer.Stop(), and I assumed this was ok,...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.