Error: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

I developed a console program using COM to connect to Sage 50 and import several data files. I tested the program in two machines (a desktop: Windows 7 & 64bit / a terminal server=Windows 2012 & 64 bit), and it worked fine in both machines. Now I tested the same program in our client's terminal server (Windows 2008 R2 & 64 bit), and I am getting the error message at GetApplication as follows:

Application: peachw.exe Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.NullReferenceException Stack: at <Module>.PAWLegacy.CPeachwApp.InitInstance(PAWLegacy.CPeachwApp*) at PAWLegacy.LegacyStartup.StartPAW() at Peachw.Program.Main(System.String[]) 

Client's terminal server has Sage 50 and Sage 50 SDK installed, and the company folder is in the server. 

What would be the cause of this error?