Tricky Parts of QuickBooks SDK Development
vb
   
28 January 2017
   
index
Explanation of This Post
The app only release in local area network.
QuickBooks Holding System: QuickBooks is holding in Windows Server 2008 R2.
QuickBooks has multiple user accounts, Windows also.
Any Windows user account can run QuickBooks with any QuickBooks user account.
QuickBooks Already Has a File Open
The only different is the first time Visual Studio under Administrator privilege, the second time under my user name. I tried many different user privileges as an experiment.
I found that if a QuickBooks SDK app running in Administrator, and other Windows users having QuickBooks open, then quickbooks would consider "file open" although QuickBooks is closed under my Windows user account, except QuickBooks SDK app running in my Windows user account.
Scene 2. I assigned "qbUsr1" as QuickBooks user for QuickBooks SDK app when QuickBooks is not launched. Some times, the familiar error box occurs while I execute the app.
I realized that if other Windows user login QuickBooks via "qbUsr1", and QuickBooks SDK app tried to connect, QuickBooks will refuse the connection of QuickBooks SDK app.
Conclusion, when working on QuickBooks SDK app, make sure the QuickBooks SDK app user only for the app, and the app should not run under Windows Administrator.
QuickBooks SDK App on IIS
I googled it and found out a stackoverflow answer. Base on the answer, I knew that QuickBooks program and IIS can not share the same Local Security Authority (LSA) session, so that the app can not know QuickBooks is running. However, IIS Express don't have LAS Session problem, then the app executes properly.
Allow IIS Express Serves Remotely
netsh http add urlacl url=http://YourHostName:yourPortNumber/ user=windowsUserName
Reversely, running netsh http delete urlacl url=http://YourHostName:yourPortNumber/ can remove wrong setting.
The other key point is to allow traffic through the host os firewall.
The final key point is to change the IIS Express url.