M
Marlon
<! -- Web.config-->
<authentication mode="Windows" />
<identity impersonate="true" />
<! -- Web.config-->
where Configurations.ADsUsersPath is
LDAP://domain.com/ou=Users,ou=Corporate,dc=domain,dc=com
ds = New DirectoryEntry(Configurations.ADsUsersPath)
'creates searcher object, set filter string ... tells seacher object to look
this object in the active directory
dsSrch = New DirectorySearcher(ds)
' pull this information about the object (user object)
dsSrch.Filter = Configurations.ADsQuery ''
"(&(objectClass=user)(objectCategory=person)(sAMAccountName=*))"
dsSrch.PropertiesToLoad.Add("sAMAccountName")
dsSrch.PropertiesToLoad.Add("mail")
dsSrch.PropertiesToLoad.Add("name")
dsSrch.PropertiesToLoad.Add("sn")
dsSrch.PropertiesToLoad.Add("givenName")
dsSrch.PropertiesToLoad.Add("telephoneNumber")
results = dsSrch.FindAll() ' commence search
on windows 2003 "results = dsSrch.FindAll()" throws an exception "
System.Runtime.InteropServices.COMException (0x8007200A): The specified
directory service attribute or value does not exist "
I know that it is problem with the security because if give user id and
password to the ds object it works fine.
Does anyone know what I can do get the above to work with impersonation?
<authentication mode="Windows" />
<identity impersonate="true" />
<! -- Web.config-->
where Configurations.ADsUsersPath is
LDAP://domain.com/ou=Users,ou=Corporate,dc=domain,dc=com
ds = New DirectoryEntry(Configurations.ADsUsersPath)
'creates searcher object, set filter string ... tells seacher object to look
this object in the active directory
dsSrch = New DirectorySearcher(ds)
' pull this information about the object (user object)
dsSrch.Filter = Configurations.ADsQuery ''
"(&(objectClass=user)(objectCategory=person)(sAMAccountName=*))"
dsSrch.PropertiesToLoad.Add("sAMAccountName")
dsSrch.PropertiesToLoad.Add("mail")
dsSrch.PropertiesToLoad.Add("name")
dsSrch.PropertiesToLoad.Add("sn")
dsSrch.PropertiesToLoad.Add("givenName")
dsSrch.PropertiesToLoad.Add("telephoneNumber")
results = dsSrch.FindAll() ' commence search
on windows 2003 "results = dsSrch.FindAll()" throws an exception "
System.Runtime.InteropServices.COMException (0x8007200A): The specified
directory service attribute or value does not exist "
I know that it is problem with the security because if give user id and
password to the ds object it works fine.
Does anyone know what I can do get the above to work with impersonation?