This classic ASP code worked in IIS 6, but not in IIS7. It was a great way for me to check an authenticated username against an AD group membership list to give certain options on pages. Does anyone have a suggestion for a replacement (other than hard-coding usernames)?
username_found_sw = "N"
Set oGroup = GetObject("WinNT://domain/its_staff")
For Each oMember in oGroup.Members
If Ucase(trim(oMember.Name)) = trim(Session("username")) Then
username_found_sw = "Y"
End If
Next
Set oGroup = Nothing