Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Performance Counters - Access Denied??

Reply
Thread Tools

Performance Counters - Access Denied??

 
 
chortler@fetchmail.co.uk
Guest
Posts: n/a
 
      05-10-2005
When I try the following piece of code, using a administrator's
account, I get an error of access denied. Getting the counters for the
local machine works fine. Any ideas??


WEB.CONFIG
identity impersonate="true" userName="DOMAIN\admin" password="xyz"/>



Public Class Class1
Dim perfFreeMem As New PerformanceCounter("Memory", "Available
MBytes")
Dim perfServSess As New PerformanceCounter("Server", "Server
Sessions")

Sub New(ByVal sServername As String)
perfFreeMem.MachineName = sServername
perfServSess.MachineName = sServername
End Sub

Public ReadOnly Property GetValue() As String
Get
On Error GoTo Err_Handler
Dim sTmp As String
sTmp = perfFreeMem.NextValue & " " & perfServSess.NextValue
Return sTmp
Err_Handler:
sTmp = "- " & Err.Description()
Return sTmp
End Get
End Property
End Class

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance Counters not working from ASP.NET Brian Newtz ASP .Net 0 12-13-2004 04:18 PM
Performance counters Dmitry Duginov ASP .Net 5 12-07-2004 12:58 AM
Re: ASP.NET Performance Counters are all zero ... ? Michael Carr ASP .Net 4 01-12-2004 04:30 PM
Re: ASP.NET Performance Counters are all zero ... ? Michael Carr ASP .Net 0 01-09-2004 03:15 AM
.NET Clr Data performance counters Erik Cruz ASP .Net 0 10-27-2003 02:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57