Performance counters are system level objects, you need to impersonate
administrator or SYSTEM users group to get that to work.
If you compiled that and ran it as a shell program as a qualified user,
it would work fine.
If you are running it in asp.net, then the ASPNET user isn't in the
right groups.
Rahul Singh
rahul.singh@a...
anant systems, inc. | making information work for you
anantsystems.net | ioserver.net
-----Original Message-----
From: HandoyoKristanto@t... [mailto:HandoyoKristanto@t...]
Sent: Thursday, March 13, 2003 3:58 AM
To: ASPX_Professional
Subject: [aspx_professional] Performance Counters
Hi guys..
I want to monitor my web application performance use
"PerformanceCounter"
class. Do anybody know why I always get Access Denied every time I
execute
PerformanceCounter class?
This is the error message : "Access is denied"
The Code :
1. Dim MemoryUsed As New PerformanceCounter("Memory", "Available
MBytes")
2. Dim CLR_Memory_Total_Committed_Bytes As New
PerformanceCounter(".net
clr memory", "# Total 3. committed bytes", "aspnet_wp")
There is error in line 1. "Access Denied" Why ?
Thanks A lot for your attention and your feedback to me.
Regards,
Handoyo
------------------------------------------------------------------------
----
Ikuti polling TELKOM Memo 166 di www.plasa.com dan menangkan hadiah
masing-masing Rp 250.000 tunai
------------------------------------------------------------------------
----