2008-08-29 41 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兼容。