Click here to Skip to main content
13,146,742 members (79,950 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim de As New DirectoryEntry("LDAP://,dc=local")
        de.AuthenticationType = AuthenticationTypes.None
        de.Username = "esnlab.local\administrator"
        de.Password = "admin@123"
            Dim ds As New DirectorySearcher(de)
            Dim mySearchResultColl As SearchResultCollection
            Dim mySearchResult As SearchResult
            mySearchResultColl = ds.FindAll
            Dim result As SearchResult = ds.FindOne()
            Dim counter As Integer = 0
            For Each mySearchResult In mySearchResultColl
                counter = counter + 1
        Catch ex As Exception
            Response.Write("Bind Failed: " + ex.Message)
        End Try
Posted 16-Nov-12 2:02am
Abhijit Dan 19-Nov-12 1:20am
If there was any mistake I did,I beg apology for that and i am extremely sorry.

ya I have also tried with
de.Username = administrator
de.Password = admin@123
and I spelled it correctly,I have checked it.

Although I am not able to solve the problem. Is there any other solution ? Help me please,please.......

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170915.1 | Last Updated 16 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100