Re: Check calling users group membership

From: Ivan Medvedev [MS] (ivanmed_at_online.microsoft.com)
Date: 07/25/03


Date: Fri, 25 Jul 2003 14:05:10 -0700


Niclas -
you have to do this first:

AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal)
Hope this helps.
--Ivan

This message is provided "AS IS" with no warranties, and confers no rights.

"MS Newsgroups" <lindblom_niclas@hotmail.com> wrote in message
news:u27UICuUDHA.624@TK2MSFTNGP10.phx.gbl...
> 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: ICallbackEventHandler
    ... As for the ICallBackEventHandler interface, ... contains two member functions we need to implement: ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.dotnet.framework)
  • RE: How to ...
    ... And a community ... member has provided a reply to you in another post, ... This posting is provided "as is" with no warranties and confers no rights. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Do Group Policies apply to groups?
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... User1 is a member of a group2 in OU2. ... In this situation, how are GPOs applied? ...
    (microsoft.public.windows.group_policy)
  • Re: event handler signature private/public?
    ... As long as event handler function is the ThreadWithstate class's member ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Problem running ASP.NET 2.0 on Win2K domain controller
    ... A Win 2003 server can be member and not a DC. ... (This posting is provided "AS IS", with no warranties, and confers no ...
    (microsoft.public.dotnet.framework.aspnet.security)