N
naijacoder naijacoder
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
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