验证Active Directory错误 [英] Authenticate Active Directory Error

查看:87
本文介绍了验证Active Directory错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友

我想检查输入的用户名密码是否存在于活动目录中
我的服务器是Windows 2003
我正在使用Visual Studio 2010
我的代码是

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
        Try
            Dim Results As System.DirectoryServices.SearchResult = Searcher.FindOne
            Success = Not (Results Is Nothing)
        Catch
            Success = False
        End Try
        Return Success
    End Function



此功能出现错误,因为
服务器无法运行

请帮助我的朋友,因为我是这个概念的新手

在此先感谢
Sanju



this function is getting error as
Server is not operational

Please help me friends because i m new in this concept

Thanks in Advance
Sanju

推荐答案

首先看一下
http://www.iwillusegooglebeforeaskingdumbquestions.com/ [ ^ ].
现在尝试使用
服务器无法运行"活动目录" 2003
First take a look at
http://www.iwillusegooglebeforeaskingdumbquestions.com/[^].
And now try it with
"server is not operational" "active directory" 2003


这篇关于验证Active Directory错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆