未知错误(0x80005000) [英] Unknown Error (0x80005000)

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

问题描述

我一直在尝试使用LDAP验证用户名和密码,但是我收到一个消息框显示未知错误:(0x80005000)。一旦我关闭了未知错误消息框它显示登录屏幕但不执行身份验证。



请建议一些解决方案



我使用的代码如下:



I have been trying to authenticate username and password using LDAP, but I get a Message Box showing Unknown Error:(0x80005000).Once I close the Unknown Error Message Box it displays the Login screen but does not perform authentication.

Please suggest some solution

The code which I have used is as follows:

/// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class Login : Window
    {
        public Login()
        {
            InitializeComponent();
            AddData adminScreen = new AddData();

           

            string username = textBoxUsername.Text;
            string password = Convert.ToString(passwordBox.Password);

            DirectoryEntry entry = new DirectoryEntry("LDAP://corporate.adcorp.com/xyz.com/dc=xyz,dc=com", username, password);
            try
            {
                Object obj = entry.NativeObject;
                DirectorySearcher search = new DirectorySearcher(entry);
                search.Filter = ("(sAMAccountName=" + username + ")");
                search.PropertiesToLoad.Add("cn");
                SearchResult result = search.FindOne();
                if (result != null)
                {
                    adminScreen.Show();
                    this.Close();
                }

            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }            
    }

推荐答案

这不是未知,0x80005000意味着指定的目录服务属性或值不存在。当全局编录服务器可能无法使用Kerberos对客户端进行身份验证时,它有时会在负载很重的情况下发生。



祝你好运

Espen Harlinn
It''s not unknown, 0x80005000 means that "The specified directory service attribute or value does not exist". It will sometimes occur under a heavy load, when the global catalog server may fail to authenticate a client by using Kerberos.

Best regards
Espen Harlinn


我发现了一堆0x80005000 Google搜索。这是其中之一:使用LDAP的0x80005000 VBScript - 由组名中的正斜杠(/)引起。
I found a bunch of occurrences of 0x80005000 Google Search. Here''s one of them: 0x80005000 using LDAP in VBScript - caused by forward slash ("/") in a group name.


这篇关于未知错误(0x80005000)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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