Re: VB .Net Security Question

From: David Allen (dallen@carrieraccess.com)
Date: 02/14/03


From: "David Allen" <dallen@carrieraccess.com>
Date: Fri, 14 Feb 2003 15:14:51 -0700


I'll do the imperative check Joe. My guess is that it will tell me that the
user isn't in the role, but we'll see. With regards to the current
principal's type, that definately bears further investigation. I'll check
both of these out tonight, when I dig back into my code. Thanks for
responding!

- Dave

"Joe Kaplan" <ilearnedthisthehardway@noway.com> wrote in message
news:#hw8mt90CHA.2372@TK2MSFTNGP09...
> You definitely need the domain name in front of the group if it is a
Windows
> domain group. Are you sure the current principal is a WindowsPrincipal
and
> is a member of that domain group? You can do a quick and dirty imperative
> check in ASP.NET with context.User.IsInRole("DOMAIN\ArtUser").
>
> Joe K.
>
> "David Allen" <dallen@carrieraccess.com> wrote in message
> news:eyQDMZ40CHA.428@TK2MSFTNGP09...
> > Hi:
> > I am working on the middle tier of an enterprise application, and am
> > embedding security checking in it. I am trying to use the following
> snippet
> > of code to check to see if the currently logged-on use is in the group
> > ArtUser. I have tried putting the domain in front of the group name
> > (DOMAIN\ArtUser) and that didn't work. I can make this code work just
fine
> > if I use on of the BUILTIN groups like BUILTIN\Users, and it works fine
> > using Name := and the user's name. Can anyone help me out with this? Am
I
> > missing something that is just blatently obvious?
> >
> > <PrincipalPermission(SecurityAction.Demand, Role:="ArtUser")> _
> > Public Function GetArtRefs() As ArtRefs
> >
> > 'returns a collection of artref objects.
> > Dim oRefs As New ArtRefs()
> >
> > Thanks in advance,
> >
> > Dave Allen
> >
> >
>
>