COMException "Libreria non registrata." durante l'utilizzo di System.DirectoryServices
-
09-06-2019 - |
Domanda
Ho appena iniziato a ricevere il seguente errore nell'applicazione Windows Form in .NET 2 Framework su Windows 2000 durante l'utilizzo 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()
Ho reinstallato il framework e registrato nuovamente activeds.dll
tuttavia ciò non ha risolto il problema.Immagino che dovrei trovare un'altra DLL e registrarla nuovamente, tuttavia non è chiaro quale sarebbe questa DLL.
Soluzione
Avendo usato Riflettore per dare una rapida occhiata al codice dei servizi di directory, sembra che l'installazione di Active Directory Service Interfaces potrebbe essere kaput.
È possibile scaricare la versione 2.5 da Technet anche se non sono sicuro che sia l'ultima versione o che funzioni con Windows 2000.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow