M
maria.s
Hi,
I've got a problem with an LDAP query submitted from my ASP.NET application.
Configuration: Windows 2003 Server Standard Ed., the application uses
Windows Integrated Authentication and is configured with <identity
impersonate=â€true†/>
I try to submit the following query:
Dim IdentityName as String = Context.User.Identity.Name
Dim sRoot As String = "LDAP://" + rootDomain
Dim de As New DirectoryServices.DirectoryEntry(sRoot)
de.AuthenticationType = DirectoryServices.AuthenticationTypes.Secure
Or DirectoryServices.AuthenticationTypes.Delegation
Dim filter As String =
String.Format("(&((objectClass=user)(sAMAccountName={0})))",
IdentityName.Split("\"c)(1))
Dim ds As New DirectoryServices.DirectorySearcher(de, filter)
Dim sr As DirectoryServices.SearchResult = ds.FindOne
Dim desr As DirectoryServices.DirectoryEntry = sr.GetDirectoryEntry
This query fails at the last line (sr = Nothing)
If I change the configuration to use Basic authentication, the query succeeds.
If I put a userName and password to the identity tag the query also
succeeds. (but other parts of the program will not work with this
configuration).
I would appriciate any help in this
I've got a problem with an LDAP query submitted from my ASP.NET application.
Configuration: Windows 2003 Server Standard Ed., the application uses
Windows Integrated Authentication and is configured with <identity
impersonate=â€true†/>
I try to submit the following query:
Dim IdentityName as String = Context.User.Identity.Name
Dim sRoot As String = "LDAP://" + rootDomain
Dim de As New DirectoryServices.DirectoryEntry(sRoot)
de.AuthenticationType = DirectoryServices.AuthenticationTypes.Secure
Or DirectoryServices.AuthenticationTypes.Delegation
Dim filter As String =
String.Format("(&((objectClass=user)(sAMAccountName={0})))",
IdentityName.Split("\"c)(1))
Dim ds As New DirectoryServices.DirectorySearcher(de, filter)
Dim sr As DirectoryServices.SearchResult = ds.FindOne
Dim desr As DirectoryServices.DirectoryEntry = sr.GetDirectoryEntry
This query fails at the last line (sr = Nothing)
If I change the configuration to use Basic authentication, the query succeeds.
If I put a userName and password to the identity tag the query also
succeeds. (but other parts of the program will not work with this
configuration).
I would appriciate any help in this