WindowsPrincipal.IsInRole()

From: PixPex (pixpex@yahoo.com)
Date: 07/30/02


From: "PixPex" <pixpex@yahoo.com>
Date: Tue, 30 Jul 2002 05:49:06 -0700


I'm runnig the following code from a machine named PIXEL
which is part of DEV Domain (Win2000) .... and
Administracion is another domian (Win NT 4) with trust
rellations.

my user is: DEV\Brian

I am member of
PIXEL\VS Developers
DEV\Domain Admins
Administracion\SQLAdmin

but in the messagebox says:
false - PIXEL\VS Developers
true - WindowsBuiltInRole.Administrator
true - DEV\Domain Admins
false - Administracion\SQLAdmin

WindowsIdentity wI = WindowsIdentity.GetCurrent();
WindowsPrincipal pr = new WindowsPrincipal(wI);

MessageBox.Show (pr.Identity.Name);
MessageBox.Show (pr.IsInRole(@"PIXEL\VS
Developers").ToString());
MessageBox.Show (pr.IsInRole
(WindowsBuiltInRole.Administrator).ToString());
MessageBox.Show (pr.IsInRole(@"DEV\Domain Admins").ToString
());
MessageBox.Show (pr.IsInRole
(@"Administracion\SQLAdmin").ToString());

I would like to know what is the problem ... it should
says allways true ... does the .IsInRole() method has any
restrictions....

I'd appreciate any guide
                  PixPex
               pixpex@yahoo.com



Relevant Pages

  • Re: WindowsPrincipal.IsInRole()
    ... > which is part of DEV Domain ... > false - PIXEL\VS Developers ... > true - DEV\Domain Admins ... > WindowsIdentity wI = WindowsIdentity.GetCurrent; ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: WindowsPrincipal.IsInRole()
    ... I have a very similar scenario and SP2 made no difference. ... Alan ... >> false - PIXEL\VS Developers ... >> true - DEV\Domain Admins ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Domain Admin Permissions
    ... Create a group for that "developpers admins" ... English blog: http://lordoftheping.blogspot.com ... I need the developers to be able to have admin rights on any computer in the ... but want them out of the domain admins group.... ...
    (microsoft.public.windows.server.active_directory)
  • Re: Security roles for Developers
    ... VS.NET developers should not be admins. ... The Non-Admin blog - running with least privilege on the desktop ... I donīt remember about the Debugger Users group (the answer is in the docs ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Security roles for Developers
    ... VS.NET developers should not be admins. ... The Non-Admin blog - running with least privilege on the desktop ... I donīt remember about the Debugger Users group (the answer is in the docs ...
    (microsoft.public.vsnet.ide)