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 >