Let’s start out with a scenario: we have a series of web apps for internal use (running on LAMP boxes) and we want the data to be pushed into QuickBooks semi-automagically. We wanted more magic and less semi, but the accountants wouldn’t let us. At any rate, we wanted to keep the same setup. We eventually got things working, more or less, by running a web service in ASP.NET on IIS on the same machine as a Quickbooks instance and letting the PHP side talk to that through SOAP. It works pretty well on the whole, but getting QuickBooks to interoperate with ASP.NET turned out to be a pain. After Googling, trial, and error, here are the steps I took to get the libraries to work all happily:
- Install QBFC and qbXMLRP2; if you installed the SDK, the installers will exists on your hard drive. The filenames are:
- QBFC8_0Installer.exe (install with the command QBFC8_0Installer.exe /v”ALLUSERS=1″)
- qbXMLRP2e.exe (install with the command qbXMLRP2e.exe /RegServer)
- Go to Control Panel->Administrative Tools-> Component Services
- From there, navigate to Console Root->Component Services->Computers-> My Computer->DCOM Config
- Right click on qbXMLRp2e and select properties
- Here, you are going to grant permissions to the various users associated with an ASP.NET call so that the COM calls can be made
- Click ‘Customize’ in the ‘Launch and Activation Settings’ section
- Grant ‘Local Launch’ and ‘Local Activation’ permissions to the following users:
- Network Service
- ASPNET
- IUSR_MACHINENAME
- IWAM_MACHINENAME
- INTERACTIVE
- Where you need to substitute the name of your machine for ‘MACHINENAME’
- Grant ‘Local Launch’ and ‘Local Activation’ permissions to the following users:
- Click ‘Customize’ in the ‘Access Permissions’ page
- To the same users above, grant ‘Local Access’
- Click ‘Customize’ in the ‘Launch and Activation Settings’ section
- Finally, fire up QuickBooks and log in (preferably, with a user specially created for the purpose).
The long and short of it is making sure that the correct permissions are assigned to the correct COM components. In our setup, we left QuickBooks running constantly on a dedicated Windows XP virtual machine. I am unsure whether there is a better way to handle this, but it does not really seem like there is.
References