PrincipalPermission, getting started

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • codefragment@googlemail.com

    PrincipalPermission, getting started

    Hi
    On a machine called 'machineName', a user called userName is a
    member of the ora_dba group. I can see this in computer management.
    Why then does the below throw an exception?


    AppDomain.Curre ntDomain.SetPri ncipalPolicy(Pr incipalPolicy.W indowsPrincipal );

    PrincipalPermis sion p = new PrincipalPermis sion("\\machine Name
    \userName", @"machineName\o ra_dba", true);
    p.Demand();

    thanks
Working...