使用System.DirectoryServices时COMException“库未注册。”

时间:2021-07-16 02:59:05

I have only just started received the following error in my windows forms application under .NET 2 framework on windows 2000 when using System.DirectoryServices.

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

    {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()

I have re-installed the framework and re-registered activeds.dll however this has not resolved the issue. I am guessing I need to find another dll and re-register it however it is not clear which dll this would be.

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

1 个解决方案

#1


1  

Having used Reflector to have a quick peak at the Directory Services code, it looks like your Active Directory Service Interfaces installation might be kaput.

使用Reflector在目录服务代码上有一个快速的峰值,看起来您的Active Directory服务接口安装可能是kaput。

You can download version 2.5 from Technet although I'm not sure if it's the latest version or if it works with Windows 2000.

您可以从Technet下载2.5版本,但我不确定它是否是最新版本,或者它是否适用于Windows 2000。

#1


1  

Having used Reflector to have a quick peak at the Directory Services code, it looks like your Active Directory Service Interfaces installation might be kaput.

使用Reflector在目录服务代码上有一个快速的峰值,看起来您的Active Directory服务接口安装可能是kaput。

You can download version 2.5 from Technet although I'm not sure if it's the latest version or if it works with Windows 2000.

您可以从Technet下载2.5版本,但我不确定它是否是最新版本,或者它是否适用于Windows 2000。