未知错误(0x80005000)
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Runtime.InteropServices.COMException: 未知错误(0x80005000)源错误:
行 30: // {
行 31: // 绑定到本机 AdsObject 以强制身份验证。
行 32: Object obj = entry.NativeObject;
行 33: DirectorySearcher search = new DirectorySearcher(entry);
行 34: search.Filter = "(SAMAccountName=" + username + ")";
源文件: d:\workdir\innerworknet\components\user\ldapauthentication.cs 行: 32 堆栈跟踪:
[COMException (0x80005000): 未知错误(0x80005000)]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +705
System.DirectoryServices.DirectoryEntry.Bind() +10
System.DirectoryServices.DirectoryEntry.get_NativeObject()
InnerWorkNet.Components.User.LdapAuthentication.IsAuthenticated(String domain, String username, String pwd) in d:\workdir\innerworknet\components\user\ldapauthentication.cs:32
InnerWorkNet._default.Button1_Click(Object sender, EventArgs e) in d:\workdir\innerworknet\loginform.aspx.cs:83
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.2300; ASP.NET 版本:1.1.4322.2300
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Runtime.InteropServices.COMException: 未知错误(0x80005000)源错误:
行 30: // {
行 31: // 绑定到本机 AdsObject 以强制身份验证。
行 32: Object obj = entry.NativeObject;
行 33: DirectorySearcher search = new DirectorySearcher(entry);
行 34: search.Filter = "(SAMAccountName=" + username + ")";
源文件: d:\workdir\innerworknet\components\user\ldapauthentication.cs 行: 32 堆栈跟踪:
[COMException (0x80005000): 未知错误(0x80005000)]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +705
System.DirectoryServices.DirectoryEntry.Bind() +10
System.DirectoryServices.DirectoryEntry.get_NativeObject()
InnerWorkNet.Components.User.LdapAuthentication.IsAuthenticated(String domain, String username, String pwd) in d:\workdir\innerworknet\components\user\ldapauthentication.cs:32
InnerWorkNet._default.Button1_Click(Object sender, EventArgs e) in d:\workdir\innerworknet\loginform.aspx.cs:83
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.2300; ASP.NET 版本:1.1.4322.2300
解决方案 »
- Label在页面上的定位问题
- An error occurred during the parsing of a resource required to service this requ
- 一个判断的简单为题
- HQL 一个非常郁闷的查询问题 在线
- 大家对公共函数是怎么调用的?有什么简单方法?
- 请问:Dim spacer As LiteralControl = New LiteralControl("<br>")是什么意思?怎么这样加<br>?
- 大家用怎样vs.net+dreamweaver开发ASP.net项目?
- 如果调用ORCAL的存储过程
- 如何利用ASP.net读取虚拟目录中的内容?
- 为什么我的机器上<%@ Import "System.Data.ADO"%>编译通不过?
- 请教:如何在.aspx中取得从.ascx中定制的控件中的值.
- 求一个左右框架的页面代码。
改成
Object obj = (Object)entry.NativeObject;
试试
资深C#专业QQ群组11440220 ,汇集800多位C#程序爱好者,欢迎加入,共同交流学习!提醒:本群只讨论c#编程及其相关;此外因为我们清理潜水员的频率比较高,如果你只是抱着“看看新鲜”的态度,不是真诚的与大家互动交流的兄弟————敬请勿入!!
改成
Object obj = (Object)entry.NativeObject;还是一样。
System.Runtime.InteropServices.COMException 是因 “当从 COM 方法调用返回无法识别的 HRESULT 时引发的异常。”在windows server 2000 和 xp sp2 中能正常使用,windows 2003 中对COM 调用是不是有什么不同?
new DirectoryEntry( _path,
domainAndUsername, pwd);windows server 2000 和 xp sp2 中 domainAndUsername 可以用domain\username
windows 2003 用单用 username 成功。