Unable to connect Quickbook desktop app to third party app
I have built a desktop application using C# that fetches data from QuickBooks Desktop. However, whenever I try to establish a connection between my app and QuickBooks Desktop using IQBSessionManager, I encounter an bellow error
(Not_Detected): System.Runtime.InteropServices.COMException (0x80040430): This application is unable to log into this QuickBooks company data file automatically. The QuickBooks administrator must grant permission for an automatic login through the Integrated Application preferences. If such permission was already granted, the administrator must revoke permission, save preferences, then grant the permission again. at QBFC13Lib.IQBSessionManager.BeginSession(String qbFile, ENOpenMode openMode)
Bellow C# code try make connection to Quickbook desktop app. but it throwing error.
static IQBSessionManager sessionManager = null;
sessionManager = new QBSessionManager();
string qbFile ="C:\CompanyFile.qbw";
sessionManager.OpenConnection2(" ", "Upload Client", ENConnectionType.ctLocalQBD);
sessionManager.QBAuthPreferences.PutIsReadOnly(true);
sessionManager.BeginSession(qbFile, ENOpenMode.omDontCare);
My Setting
- QBD opened as Signle user mode
- Company file placed in directly C:/ not inside company file folder
- Edit->Preferences-> Integrated Applications
- Deselect check box "Dont allow any application to access this company file"
- Select checkbox "Allow this application to read this company file"
Note This error does not occur for every user. The code works fine on one computer, but on another computer, it throws the error mentioned above. I have checked the settings on both machines, and they are the same
please help me to resolve this issue