Wrong Application for Code Error

Problem: Application registration using a Windows Mobile emulator appears successful in Sybase Control Center, but the application log shows a Wrong Application for Code error when the application attempts to connect to Unwired Server.

This error occurs when you:
  • Hard reset a Windows Mobile device emulator,
  • Close an emulator without saving the emulator state, or
  • Uninstall and reinstall the Unwired Server client software on the device.

Explanation: Because emulators do not generate unique application IDs, the Unwired Server messaging software on the device creates an application ID during installation and stores it in the emulator application registry. After registration, this permanent link between the emulator and the application ID must remain.

Hard resetting the emulator, closing the emulator without saving the emulator state, or uninstalling and reinstalling the Unwired Server client software purges the device registry and breaks the link between Unwired Server and the device software. When you attempt to reconnect, Unwired Server creates a new application ID for the device. Without the original application ID, the server cannot identify the device emulator, and therefore, cannot establish a relationship between the application and the activation code.

To avoid this problem so that the emulator and server remain synchronized, always save the emulator state before you close the emulator, and refrain from hard resetting the emulator, or uninstalling and reinstalling the client software.
Note: Before saving the state of an emulator, always uncradle the emulator using the Device Emulation Manager. This allows the device emulator to be cradled when the save image is loaded and used in the future.

Solution: Reconnect the emulator by either:

  1. Deleting the original application from Unwired Server, then reregister the application, or
  2. Reregistering the application
Related reference
User Name of Registered Application Connection Not Displayed
Internal Server Error When Clicking Applications