Performance Counters - Access Denied??

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Performance Counters - Access Denied??

    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

    chortler@fetchmail.co.uk Guest

  2. Similar Questions and Discussions

    1. Performance Counters on Windows Server 2003
      This is a new install of ColdFusion MX7 on Windows Server 2003. When I open up Performance Monitor in the Operating System I don't have any counters...
    2. CFMX 7 Multiserver Conf Performance counters
      Hi, I am very new to Cold Fusion. I have seen many unreplied posts on ColdFusion Perfomance....I have CFMX 7 multiserver configuration running on...
    3. Web Service + Anon Access, but getting 401 Access Denied Error
      I have a simple webservice that just returns a string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous...
    4. Access denied when creating Access application object
      In an ASP file I am running the following in VBScript in order to extract data from an Access 2002 MDB file which is physically located in the...
    5. access denied on data access pages
      I have created data access pages that worked well when I tried them on two separate computer simutaneously, but when we went into production we got...
  3. #2

    Default Re: Performance Counters - Access Denied??

    Perf counters run as COM calls, you need to add the appropriate permissions
    to the COM process. One quick way to test this is to bump the process up to
    system in the machine config files. Once the call to perf counters works,
    figure out exactly what permissions to add and change the account back down
    to what it was in the machine config file. It's very dangerous to leave the
    account running under system

    --
    Regards,
    Alvin Bruney - ASP.NET MVP

    [Shameless Author Plug]
    The Microsoft Office Web Components Black Book with .NET
    Now available @ [url]www.lulu.com/owc[/url], Amazon.com etc
    <chortler@fetchmail.co.uk> wrote in message
    news:1115718097.145092.310050@o13g2000cwo.googlegr oups.com...
    > 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
    >

    Alvin Bruney [MVP - ASP.NET] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139