That looks more like a perf counter or a named mutex.
Without knowing what method you've called it's hard to answer this question
exactly.
If it's a perf counter, the user must have the required access (which we
don't know). If it's a named mutex, whatever is creating the mutex must give
access to the current user. Again, since we don't know what you're calling
we can't tell how to discern if the current user has the required access to
do what you want.
Most method list the security requirements need in order to call them. You
can either add a try/catch(SecurityException) block around the code that may
not have access, or if you know the specific security permission that is
required you can create an instance of that type and call its Demand method
with a try/catch(SecurityException)--which would ensure things don't get into
an unknown state.

Signature
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
> I am writing an application where I obtain the IP address of the local
> adapter. When the user is logged in as Guest, this call fails with an
[quoted text clipped - 9 lines]
>
> Gene Chang
Günter Prossliner - 19 Nov 2007 08:06 GMT
Hallo!
> That looks more like a perf counter or a named mutex.
It is a Performance-Counter
(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\.NET CLR Networking).
The error-message ("Acces to path ... denied") sounds like the caller
doesn't hold the nessersary "unmanaged Permission" (ACLs).
GP