Re: Displaying different content on one Asp.net page(populated from a DB)

From: naijacoder naijacoder (naijacoder_at_toughguy.net)
Date: 08/30/04


Date: Sun, 29 Aug 2004 23:52:51 -0700

Thx alot but i have a question for you:-
can't get WindowsPrincipal.IsInRole() to work for me when using
 Windows Authentication. Here's a snippit of code from my C#
 codebehind page:
 
 WindowsPrincipal wp = new WindowsPrincipal(
 WindowsIdentity.GetCurrent() );
 lblUser.Text = wp.Identity.Name;
 Label1.Text = wp.IsInRole(@"DOMAIN\group").ToString();
 
 
 where "DOMAIN\group" is a valid group name. The username shows up
 correctly as "DOMAIN\username" but for any non-builtin roles,
 IsInRole() returns false. Does anyone have suggestions as to why this
 is not working?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • WindowsPrincipal.IsInRole() problem with non-builtin roles
    ... Windows Authentication. ... Here's a snippit of code from my C# ... codebehind page: ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: PlaySound
    ... Perhaps you mean "SystemStart" and not "Start Windows" ... Frank Hickman ... Here is a snippit of the "window proc": ...
    (microsoft.public.vc.language)
  • Re: General questions about LDAP, GC and access permissions
    ... Windows Communication Foundation) they are authenticated with the regular ... this is done by examing what groups the user is a member of. ... Since the regular windows authentication is used, ... trusted domain in an external forest. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Help please to authenticate Windows users
    ... status error code as well as Win32 error code -- I know the HTTP status code ... Windows Authentication automatically works if the machines are joined to the ... Is VS.Net on the same machine as IIS ...
    (microsoft.public.inetserver.iis.security)
  • Re: Intermittent access to web site secured with Windows authentication
    ... Marcus ... > Windows Authentication is connection-based and not delegatable. ... > various elements of Internet networking that can prevent Windows ... > likely work in your access scenario. ...
    (microsoft.public.inetserver.iis.security)