我刚刚开始在 Windows 2000 上的 .NET 2 框架下的 Windows 窗体应用程序中使用时收到以下错误 System.DirectoryServices.

    {System.Runtime.InteropServices.COMException}
System.Runtime.InteropServices.COMException: {"Library not registered."}
_className: Nothing
_COMPlusExceptionCode: -532459699
_data: Nothing
_dynamicMethods: Nothing
_exceptionMethod: Nothing
_exceptionMethodString: Nothing
_helpURL: Nothing
_HResult: -2147319779
_innerException: Nothing
_message: "Library not registered."
_remoteStackIndex: 0
_remoteStackTraceString: Nothing
_source: Nothing
_stackTrace: {System.Array}
_stackTraceString: Nothing
_xcode: -532459699
_xptrs: 0
Source: "System.DirectoryServices"
StackTrace: "   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) 
  at System.DirectoryServices.DirectoryEntry.Bind()
  at System.DirectoryServices.DirectoryEntry.get_AdsObject()
  at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
  at System.DirectoryServices.DirectorySearcher.FindAll()

我已经重新安装框架并重新注册 activeds.dll 但这并没有解决问题。我猜我需要找到另一个 dll 并重新注册它,但不清楚这会是哪个 dll。

有帮助吗?

解决方案

使用过 反射器 为了快速了解目录服务代码,您的 Active Directory 服务接口安装可能已失效。

您可以从以下位置下载 2.5 版本 科技网 虽然我不确定它是否是最新版本或者是否适用于 Windows 2000。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top