I figured out what the problem is. I had Anonymous Authentication enabled, so
I couldnt find out what NTGroups the current user belongs.
I'm pulling out user info from ADSI. The code is:
Dim ADGroups, ADGroup As Object
Dim strAdmin as Boolean
Dim ADEntry As New DirectoryEntry("WinNT://DEV2K/administrator")
ADGroups = ADEntry.Invoke("Groups")
For Each ADGroup In ADGroups
If ADGroup.Name = "CMSAdministrator" Then
strAdmin = True
End If
Next
"Willy Denoyette [MVP]" wrote:
"Victor" <Vi****@discussions.microsoft.com> wrote in message
news:05**********************************@microsof t.com... Hi all I greatly appreciate your time and help if possible.
I'm currently using User.IsInRole("Group_name") to find out if the logged
in user belongs to a certain NT User Group. For some reason I can do this
only in the .aspx form and not in a class. I would like to write a
function
in a common .vb class that can call the WinNT local users and find out if
current user belongs to a certain group.
Thanks for your help.
V
Please post a repro that illustrates the problem, without that we can't help
you out.
Willy.