Well from what I can see User is a ASP concept. I need to work in c#
code server side.

I would love to have something like User.HasAccess
(PerformanceCounterPermissionAccess.Administer) style method that I
could check. I'm looking into checking roles but that can get very
complicated with domain names and it's not really a role, I don't care
about the role, I need to know if the user can administer performance
counters.

Man I thought this would be better documented on MSND

On Dec 10, 1:28 am, "Brandon Betances" <[EMAIL PROTECTED]> wrote:
> if (User.Role == "admin")
>
> how about that?
>
> On Tue, Dec 9, 2008 at 5:59 PM, escristian <[EMAIL PROTECTED]> wrote:
>
> > hello.
>
> > I need to create and delete PerformanceCounterCategory objects in my
> > code as part of our debugging code. Currently we noticed we have some
> > serious problems when the user is not an admin user, after some
> > searching in the code I found that this call would fail when you are
> > not an admin user.
>
> > PerformanceCounterCategory.Delete(categoryName);
>
> > Is there any way i can check to see that the current user will have
> > access to this? i would rather avoid the try/catch if possible as this
> > is called all the time and would be very costly.
>
> > Thanks

Reply via email to