Click here to Skip to main content
15,560,678 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends

I want to check whether entered username password exist in active directory
my Server is windows 2003
i m using Visual Studio 2010
my code is
Private Function ValidateActiveDirectoryLogin(ByVal Domain As String, ByVal Username As String, ByVal Password As String) As Boolean
        Dim Success As Boolean = False
        Dim Entry As New System.DirectoryServices.DirectoryEntry("LDAP://" & Domain, Username, Password)
        Dim Searcher As New System.DirectoryServices.DirectorySearcher(Entry)
        Searcher.SearchScope = DirectoryServices.SearchScope.OneLevel
            Dim Results As System.DirectoryServices.SearchResult = Searcher.FindOne
            Success = Not (Results Is Nothing)
            Success = False
        End Try
        Return Success
    End Function

this function is getting error as
Server is not operational

Please help me friends because i m new in this concept

Thanks in Advance
Updated 28-Apr-12 22:03pm

1 solution

First take a look at[^].
And now try it with
"server is not operational" "active directory" 2003
Share this answer

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900