PrincipalPermission, getting started

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

PrincipalPermission p = new PrincipalPermission("\\machineName
\userName", @"machineName\ora_dba", true);
p.Demand();

thanks
.



Relevant Pages

  • Re: Advice about fetching user information
    ... have different function from different files to prit images, member ... SELECT username FROM tbluser WHERE; ... SELECT userid, username FROM tbluser WHERE ...
    (comp.lang.php)
  • Re: Setting up Web Folders on a Server
    ... I added the user through Administrative Tools / Computer Management / Local ... The odd thing is I just tried accessing the folder directly through IE6. ... I went back to Add Network Place, entered the same url, username, and ...
    (microsoft.public.inetserver.iis)
  • Re: Forgotten password
    ... are there any tutorials/guides out there that explain how to handle this subject? ... I was thinking of having a member enter his username and email, after which I then email him a new password. ... The real question then becomes: why do I need a seperate "member-id" when one of my email addresses identifies me anyway? ...
    (comp.lang.php)
  • Re: Trying to compare usernmae to a group membership
    ... Bill Tkach wrote: ... So, if you pass it the %username%, and there's a match, it returns the ... Is there another way to compare this, or, am I almost there? ... the current user is a member. ...
    (microsoft.public.windows.server.scripting)
  • Re: Forgotten password
    ... are there any tutorials/guides out there that explain how to handle ... I was thinking of having a member enter his username and email, ... In many of the places where I have a user-id (ISP, hosting etc) the email ...
    (comp.lang.php)