Re: WindowsPrincipal.IsInRole not working
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 09/30/03
- Previous message: I'm Home: "Re: Watch this critical update for Microsoft Windows (CAUTION VIRUS)"
- In reply to: K. Shier: "Re: WindowsPrincipal.IsInRole not working"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: WindowsPrincipal.IsInRole not working"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 29 Sep 2003 23:00:25 -0500
Do a Google search for Reflector and/or Anakrino. They are excellent type
browser/reverse compilers and are very helpful for figuring out how things
work. That's how I figured out there was a private method called _GetRoles
that returns an array which is used by the IsInRole method. ILDASM is also
very helpful, but it doesn't give you nice VB.NET or C#. Reflector is my
new favorite. Also, Rotor, the Shared Source implementation of the .NET
Framework is very helpful as even has commented source code for much of the
base class library.
Regarding the rules on what to call and such, it is pretty simple. You
shouldn't call things that violate encapsulation rules except perhaps for
experimentation. In my earlier example, I called a private method which I
could not call without reflection. So basically, private and internal
(friend) should be off limits for production code as there is no guarantee
that the implementation won't change later or that you are calling the
member safely.
Joe K.
"K. Shier" <ks4hire@spamAtYourOwnRisk.yahoo.com> wrote in message
news:uqd5u%23phDHA.1932@TK2MSFTNGP11.phx.gbl...
> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> in message news:#tzVPN4gDHA.2960@TK2MSFTNGP11.phx.gbl...
> > That is an Active Directory question, but you should be able to change
the
> > type of the group unless it contains members that they current group
> cannot
> > contain or if it is nested in another group that cannot contain a group
of
> > the new type. The Active Directory reference in MSDN explains all of
> this.
>
> well, although it pained me to do so, i just deleted and re-created them,
> since timely answers on how to edit them were not forthcoming. there were
> only a few anyway...
>
> > Reflection is cool, isn't it? :)
>
> yes - and one of those things we are using all the time without thinking
> about it. now that i know what it is, i'll think about it more, which
might
> be a good way to start down the path of 'knowing when you should use it'!
> (i'd like to know how you arrived at the values of all the args you pass
to
> .InvokeMember in that example... for now it's just one of those things i
> look at and accept at face value knowing that it comes from a 'higher
> source' =)
>
> thanks again for the info!! =)
>
- Previous message: I'm Home: "Re: Watch this critical update for Microsoft Windows (CAUTION VIRUS)"
- In reply to: K. Shier: "Re: WindowsPrincipal.IsInRole not working"
- Next in thread: Joe Kaplan \(MVP - ADSI\): "Re: WindowsPrincipal.IsInRole not working"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|