Check calling users group membership

From: MS Newsgroups (lindblom_niclas_at_hotmail.com)
Date: 07/25/03


Date: Fri, 25 Jul 2003 20:11:19 +0100


Hi,

I have been trying to figure out how to check that a users is a member of a
certain group when a form is loaded (I am using VB .net) to filter what
users are allowed to use a application by Active Directory group membership.
I have found some samples that uses

<PrincipalPermission(SecurityAction.Demand, Role:="mydomain\My Applications
Group")> _
Public class Form1

but i can not get this to work. Can someone please post a sample showing
what the correct way of doing this is ?

Many thanks

Niclas



Relevant Pages

  • Re: Check calling users group membership
    ... This message is provided "AS IS" with no warranties, and confers no rights. ... > I have been trying to figure out how to check that a users is a member of ... Can someone please post a sample showing ...
    (microsoft.public.dotnet.security)
  • Re: Check calling users group membership
    ... ApplicationsGroup")> _ ... Public class Form1 ... > Niclas - ... Can someone please post a sample showing ...
    (microsoft.public.dotnet.security)