I'm building a small asp site to allow other members of staff to create advertisements in SMS2003, I've got that part sorted, but I need to restrict certain parts of the site to members of an AD group.
I can get the username via:
But when it comes to the next part, to get the groups that the user is a member of, the script only works if it is run on the host server, on any other server it fails at this point:
Can anyone tell me what I'm doing wrong? Is there another way to work out if the user a member of a group?
I can get the username via:
Code:
Set objADSysInfo = CreateObject("ADSystemInfo")
strUserName = objADsysInfo.UserName
But when it comes to the next part, to get the groups that the user is a member of, the script only works if it is run on the host server, on any other server it fails at this point:
Code:
Set ObjUser = GetObject("LDAP://" & strUserName)
Can anyone tell me what I'm doing wrong? Is there another way to work out if the user a member of a group?