ActiveSync may not be installed? Problem

Feb 20, 2013 at 9:21 PM
Edited Feb 20, 2013 at 9:22 PM
Hello all,

I'm currently having a problem deploying an application I developed using the RAPI2 Library. It basically uses the RAPI2 Library to obtain some information about the connected device, and move some files into/out of it. I've successfully deployed this application on 2 pcs running Windows 7 and Windows XP, however, I'm having a problem deploying this on a 3rd running Windows XP.

I've installed ActiveSync, and I can use it to browse to the Handheld connected and see the files. However, when I run the installed application I'm greeted with:
 The RAPI2 COM Library is not available. ActiveSync may not be installed. 
      at System.Devices.RemoteDeviceManager..ctor()
I seem to be having a problem getting it to recognize the ActiveSync installation. I'm not sure exactly what is causing it. I've uninstalled/reinstalled a couple times now (both applications) and nothing.

Is there anything I'm missing? Is there an obvious cause that I'm just ignoring?

Any help would be appreciated.
Feb 21, 2013 at 2:39 AM
Check to make sure that version 4.5 of ActiveSync is installed. That is the only one with the COM Rapi2 library.
Feb 21, 2013 at 1:52 PM
The ActiveSync version is 4.5.
Feb 21, 2013 at 2:27 PM
Could there be some sort of permissions problem? Where the application doesn't have rights or something? I'm grasping at straws here. I tried moving the rapi.dll file into the same directory to see if it would get picked up, but nope. It's weird because ActiveSync is having no problem picking up the device, but for some reason the application just won't find ActiveSync.
Feb 21, 2013 at 5:43 PM
I'm noticing that ActiveSync is running under a different User, could this be the problem?

Some more information if it helps:

The application gets shipped with a web application that gets installed on a Tomcat Server. The application is called by the web-application to communicate to the device. The Tomcat Server auto-starts under the SYSTEM user. When a User logs into the PC, ActiveSync is started under the User who logs in (usually under a different Domain).

I've been dealing with all sorts of authority and permissions problems with this guy, which is why I'm leaning in that direction, but I'm not that familiar with Windows Security and all this.

Any help/information would be appreciated.
Feb 21, 2013 at 6:11 PM
The problem seems to be caused by the different Users. I'm able to recreate this problem now. I don't think this is an issue with RAPI2, but more rather how ActiveSync starts and their strict permissions/authority.

Do you know if there is anyway to get ActiveSync to always start under the SYSTEM user instead of the logged in user? Or is this entire concept going to be bad?
Jun 28, 2013 at 10:23 AM
Edited Jul 19, 2013 at 9:38 AM
Try to modify cpu platform x86 x64 or Any CPU,and I'm not sure why .

In 64-bit systems or x86 configuration using anyCPU compile, run will produce this problem (64 configured and compiled without problems). But if you use anyCPU compiler is available in the x86 running on a PC.