Erste Fehler -2147220472 (Konnte nicht Quickbooks starten) [geschlossen]
Ich erhalte die Fehlermeldung -2147220472, wenn ich versuche, eine Verbindung zu Quickbooks herzustellen. Die Anwendung wird von einem Windows-Dienst ausgeführt. Die Protokolldatei sieht wie folgt aus:
I 8788 RequestProcessor ========= Started Connection =========
I 8788 RequestProcessor Request Processor, QBXMLRP2 v12.0
I 8788 RequestProcessor Connection opened by app named 'QBWatcher'
I 8788 RequestProcessor OS: Microsoft Professional (build 9200), 64-bit
I 8788 RequestProcessor Current Process is elevated
I 8788 RequestProcessor Current User is in AdminGroup
I 8788 RequestProcessor Current Process is ran as Admin
I 8788 RequestProcessor Current Process Integrity Level : 3000
I 8788 RequestProcessor Previous instance of QB is going down..! Wait and retry to get a new instance.
I 8788 RequestProcessor Previous instance of QB is going down..! Wait and retry to get a new instance.
I 8788 RequestProcessor Previous instance of QB is going down..! Wait and retry to get a new instance.
I 8788 RequestProcessor Previous instance of QB is going down..! Wait and retry to get a new instance.
I 8788 RequestProcessor Previous instance of QB is going down..! Wait and retry to get a new instance.
E 8788 RequestProcessor Could not find or create an instance of QuickBooks using InstanceFinder
I 8788 RequestProcessor Connection closed by app named 'QBWatcher'
I 8788 RequestProcessor ========== Ended Connection ==========
I 8788 CertVerifier The file does not contain an Authenticode signature.
Das funktioniert manchmal, aber ich sehe kein Muster. Was könnte das verursachen?
Kurz gesagt, der Code, mit dem eine Verbindung hergestellt wird, lautet wie folgt:
qbxmlConn.OpenConnection2(filename, "QBWatcher", QBXMLRP2Lib.QBXMLRPConnectionType.localQBD);
QBXMLRP2Lib.IAuthPreferences qbAuthPrefs = qbxmlConn.AuthPreferences;
qbAuthPrefs.PutPersonalDataPref(QBXMLRP2Lib.QBXMLRPPersonalDataPrefType.pdpNotNeeded);
qbAuthPrefs.PutUnattendedModePref(QBXMLRP2Lib.QBXMLRPUnattendedModePrefType.umpOptional);
ticket = qbxmlConn.BeginSession(filename, QBXMLRP2Lib.QBFileMode.qbFileOpenDoNotCare);