2008-08-29 63 views
1

我刚刚开始在Windows 2000上使用System.DirectoryServices时在我的Windows窗体应用程序下的.NET 2框架中收到以下错误。COMException“库未注册”。同时使用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。

回答

1

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

您可以从Technet下载2.5版本,但我不确定它是最新版本还是可以与Windows 2000兼容。