Click here to Skip to main content
11,934,443 members (52,284 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
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 3: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 | Mobile
Web01 | 2.8.151126.1 | Last Updated 16 Nov 2012
Copyright © CodeProject, 1999-2015
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