Re: ldap connection problem
- From: Paul Clement <UseAdddressAtEndofMessage@xxxxxxxxxxxxxx>
- Date: Tue, 02 Aug 2005 10:48:59 -0500
On Tue, 2 Aug 2005 06:11:05 -0700, "Amar" <Amar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
¤ I am trying to connect to my college LDAP directory using ASP.NET. This LDap
¤ does not have security as it returns only user demographic information.
¤ i do not need to bind with a username or credentials.
¤ What i am trying to do is, i am trying to look up all the information for
¤ the user with user id 'testuser'. The following is the Vb.net code for my
¤ aspx page:
¤
¤ Dim oRoot As DirectoryEntry = New
¤ DirectoryEntry("LDAP://directory.x.y/ou=People,dc=x,dc=y")
¤ Dim oSearcher As DirectorySearcher = New DirectorySearcher(oRoot)
¤ Dim oResult As SearchResult
¤ Dim propName As String
¤ Dim obProp As Object
¤
¤ Try
¤ oSearcher.Filter = "uupid=testuser"
¤ oResult = oSearcher.FindOne
¤ For Each propName In oResult.Properties.PropertyNames
¤ For Each obProp In oResult.Properties(propName)
¤ Response.Write("name= " & propName)
¤ Response.Write("value= " & obProp)
¤ Next
¤ Next
¤ Catch Ex as Exception
¤ End Try
¤
¤ The above code fails at the line "oResult = oSearcher.FindOne" and gives me
¤ an error which is useless: "Unknown error (0x80005000)"
¤ I have already posted this question twice. Is there nobody whos faced this
¤ problem?
¤ Please help me!! Thanks in advance.
Sounds like it might be a credentials issue. What level of security is set for your web application
in IIS? Are you implementing impersonation?
Paul
~~~~
Microsoft MVP (Visual Basic)
.
- Follow-Ups:
- Re: ldap connection problem
- From: Amar
- Re: ldap connection problem
- References:
- ldap connection problem
- From: Amar
- ldap connection problem
- Prev by Date: Re: How to set focus to a textbox in page in a AxWebBrowser control? thanks
- Next by Date: Re: Static Method Parameters issue
- Previous by thread: ldap connection problem
- Next by thread: Re: ldap connection problem
- Index(es):
Relevant Pages
|