WinForms Application won't connect after QB 2014 upgrade - quickbooks

I support a legacy WinForms C# application that connects to 2 QuickBooks files. It has worked very well for years, both with QuickBooks 2008 and QuickBooks 2011.
A few days ago, the client upgraded to QuickBooks 2014. The application has not sucessfully connected to the QuickBooks files since. When I run the application manually it throws a .NET error saying System.Runtime.InteropServices.COMException (0x80040408): Could not start Quickbooks.
I decided to test to make sure that the SDK I am using, version 8.0, could in fact connect to QB 2014. So, I ran the SDKTestPlus3 application. When I tried to connect to the company file, it tells me that the application is not authorized to connect to that company file. So, I opened the company file in QB and went into Single User mode, and tried again - expecting to get the pop-up asking me to grant that application the right to connect. Instead, when I tried to connect with the file open in QB in Single User mode, SDKTestPlus3 gave an error saying "A QuickBooks company data file is already open and it is different from the one requested or there are multiple company files open."
Can anyone point me in the right direction here. Is the QBFC8 compatible with QB 2014, and if so is there something I need to do to get this application that has been working with QB 2011 for so long to continue working with QB 2014?
TIA!
Additional Information
I have now noticed that the errors in connecting to QhickBooks seem to be intermittent. The WinForms application gets run by a windows scheduled task every morning at 1:00 AM. Since the upgrade to 2014 on Monday, it has failed Tuesday, Wednesday and Thursday mornings. In looking at today's log files - this morning it successfully connected and processed records in QB. Now, when I try to run it manually, instead of the (0x80040408): Could not start Quickbooks COM error I instead got COM error (0x8004041C): An internal QuickBooks error occured while trying to access the QuickBooks company data file.
Has anyone else experienced these types of problems or have any idea what may be causing them? I need this application to work consistantly as it has in the past!!

Make sure the option to Keep QuickBooks running is unchecked.
Close all QB files that are open and make sure there are no other QBW32.exe files running in the task manager. If there are, kill them.
Try connecting again.

QuickBooks can be picky about who is doing what. Even better, though I'm sure there's some set of logical conditions that make it 100% replicable, it complains about user access seemingly randomly.
Make sure your legacy WinForms application and QuickBooks itself were installed and are running under the same user account.
Another option is altering the UAC settings.
technet on UAC: https://technet.microsoft.com/en-us/library/cc709691%28v=ws.10%29.aspx
intuit on UAC and your presenting error code: http://support.quickbooks.intuit.com/support/articles/SLN40414
Ignore that bit ^^^.
There's an error in QuickBooks Pro 2014. I've encountered it running in unattended mode with your connections and sessions going back and forth between company files.
After a few back and forths, something happens in their code and when you .EndSession/.CloseConnection the QuickBooks exe doesn't shut down. Then when you try to open your next connection, the exception bubbles up and you get the InterOp exception.
What I ended up having to do was after closing the connection, waiting like half a second and then, if QB32 is running, killing it. It's a crummy fix, but I didn't have a choice, and it works.
// closeConnection is from Intuit's SessionManager.cs that gets installed with the SDK
private void closeConnection(bool logError)
{
try
{
endSession(true);
if (_bConnOpen)
{
_sessionMgr.CloseConnection();
System.Threading.Thread.Sleep(waitTime);
KillQB32W();
_queryResponse = null;
_bConnOpen = false;
}
}
catch (Exception e)
{
if (logError)
logger.logCritical("SessionManager.CloseConnection", e.Message);
throw;
}
}
private void KillQB32W()
{
System.Diagnostics.Process[] oProcess = System.Diagnostics.Process.GetProcessesByName("QBW32");
foreach (System.Diagnostics.Process q in oProcess)
{
if (!q.HasExited)
{
q.Kill();
System.Diagnostics.Debug.WriteLine("Killer");
}
}
}

Related

Watson is already running. Second session cannot be started

I have installed IBM watson studio but when i attempt to open it, I am getting an error stating " Watson is already running. Second session cannot be started"
This problem is a result of Watson Studio being logged on two devices at the same time.
Please take the following steps:
You will need to log out from one device to use on another.
You can perform this on myibm.ibm.com
Login in to https://myibm.ibm.com/dashboard/
Click 'Manage' on IBM Watson Studio Desktop
Click on head next to 'Manage devices'
Manage Devices is a way to help the you remotely log out of one device in order to log in from another (and has the same effect as Sign out and Exit from within the SPSS Client). You simply click here 'Deactivate' and you should be able to use software on another computer.
Please let me know about further issues.
It happened to me after I updated to the new version. I had to kill the process from the task manager and now the studio doesn't start up and actually 'show' unless it was Run As Administrator. Try that out, kill the process and re-run it but as admin.

Unhandled exception after moving the C# code to server

We are having an internal web application developed using C#.net, MVC. Each time 100 members access the app. while using, automatically logging out in any of the systems and with out any error page/message.
It is not occurring in a specific time/ using service. After that anybody try to login into the app, getting error message like "user name/password wrong." till application pool restarts.
The issue is occurring only with in two/three days after moving the code from local to server. After three/four days, application is working fine.
I am struggling to know the issue from code side or application pool issue?

Catch 22 Situation With Quickbooks (Can't allow app to connect because can't open QuickBooks)

(Note, I believe this is different than the previous questions I've seen on this because those all appear to apply to earlier versions or are doing something different process-wise. So, thos answers haven't helped me in this case.)
I have an application that connects to QB running fine on one machine. However, when I moved it to another machine, and I try to connect when QB IS NOT running, I get an error that "This application is not allowed to log into this QuickBooks company data file automatically. The QuickBooks administrator can grant permission for an automatic login through the Integrated Application preferences."
Ordinarily when that happens, I run the program and I'm prompted to add the application, and I do. However, on this machine I'm getting "QuickBooks can't start because it is already running. Only QB Accountant, QuickBooks bookkeeper and QuickBooks enterprise can open more than one company file" whenever I try that. I also don't see a way to manually add the application.
This is QB Desktop 2014 (350-569) and SDK13. The chain is an executable to a helper dll to the QB dll to QB.
Does anyone have any ideas as to what the issue may be?
Does anyone have any ideas as to what the issue may be?
Yep.
This is your answer:
However, on this machine I'm getting "QuickBooks can't start because it is already running. Only QB Accountant, QuickBooks bookkeeper and QuickBooks enterprise can open more than one company file
QuickBooks is already running on this computer. The other computer has nothing to do with this issue.
Your first step should be to reboot, and try again.
You can also check Windows Task Manager (taskmgr.exe) and look for the QBW32.exe process. If it's running, kill it, and then try to start QuickBooks again.
You can also check that QuickBooks is not set stay running in the background (Edit > Preferences > General > Keep QuickBooks running for faster start-ups).
You might also check to make sure your app, and QuickBooks are both running with the same user privileges. e.g. if QuickBooks is set to start as Administrator, and your app isn't, it can cause these errors. Try to run both as the Windows Administrator and see if you have better luck.

QuickBooks QBES13 - INTERNAL ERROR WHEN PROCESSING THE QBXML REQUEST

QuickBooks customers are getting various errors including
INTERNAL ERROR WHEN PROCESSING THE QBXML REQUEST
This was from a program that was running for over a year.
Happened as soon as the customer went to QBES13.
Other customers getting various QuickBooks crashes and also
QBXML components were not installed. (again on programs running for months).
The QBSDKLog got filled with:
20130701.150236 E 12504 InvoiceStorage::BuildTheRetObject This feature is not enabled or not available in this version of QuickBooks. HRESULT=0x80040527
20130701.150236 E 12504 InvoiceStorage::BuildInvoiceLine This feature is not enabled or not available in this version of QuickBooks. HRESULT=0x80040527
then:
20130701.150236 I 12504 QBSDKMsgSetHandler Request 0 completed successfully.
20130701.150238 E 12504 QBSDKProcessRequest *** INTERNAL ERROR WHEN PROCESSING THE QBXML REQUEST ***.
On an InvoiceQuery via QBFC11 using VB.Net2008.
Seems like things are falling apart.
Before you try anything else, reboot the computer running QuickBooks.
We've seen lots of problems with the latest releases of QuickBooks throwing weird errors if the computers aren't rebooted after QuickBooks installs updates.

Set up Sync Manager - Option is missing

Trying to get a test connection on the quickbooks API, but am running into a strange issue.
When testing my new created app space, I need to:
Go to QuickBooks. Open your company file.
Choose File > Set Up Intuit Sync Manager.
Sign in with your Intuit account if you haven't already done so.
Come back after Intuit Sync Manager is done syncing
My quickbooks does not have the : Set up Sync Manager : Option.
Scouring the quicbooks support docs and quickbooks telephone support, I have tried the following:
Re-orderd the "lists" in quickbooks, and repaired company file.. No go...
Made sure the company is accessed with the Admin account.
Tried by creating a completely fresh company, on my local machine, and directly after that, looking for the option.. no go (Did exit and restart Quickbooks)
Verified that the Syncmanager app is installed (resides) on my pc... C:\Program Files\Common Files\Intuit\Sync\IntuitSyncManager.exe
I can run the sync manager, and it appears in my taskbar, but tells me it has no company files to sync. Obviously, this needs to be configured from Quickbooks, which does not have the option.
Platform:
Windows 7, Windows 8, Terminal Services 2003 (All have the option missing)
Quickbooks Enterprise 13 (South Africa), believe its the UK version.
Looking forward to any help.
Regards
Only US versions of QuickBooks work with Sync Manager.

Resources