Windows autentication with WindowsPrinicipal
From: naijacoder naijacoder (naijacoder_at_toughguy.net)
Date: 08/30/04
- Next message: naijacoder naijacoder: "WindowsPrincipal.IsInRole() problem with non-builtin roles"
- Previous message: Paul Roberts: "Required permissions to set Process.PriorityClass in Win 2003 serv"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sun, 29 Aug 2004 21:11:45 -0700
Hello,
I'm using Windows Authenetication with my code below with
Windows Principal.
I noticed that when i use IsinRole with "BUILT\Administrator its does
work fine but when i use
DomainName\GroupName it doesn't go.
Does anybody know what 'm doing wrong?
Pls forward ur ideas!
Thanks
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
'Dim UserName As String = wp.Name
Dim wp As New WindowsPrincipal(WindowsIdentity.GetCurrent())
'If wp.IsInRole("DomainName\GroupName") Then
If wp.IsInRole("BUILTIN\Administrators") Then
'code
Response.Redirect("welcome.aspx")
End If
If wp.IsInRole("BUILTIN\dministrators") Then
'code
Response.Redirect("Nowelcome.aspx")
End If
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: naijacoder naijacoder: "WindowsPrincipal.IsInRole() problem with non-builtin roles"
- Previous message: Paul Roberts: "Required permissions to set Process.PriorityClass in Win 2003 serv"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]