views:

53

answers:

1

I'm developing a Windows Mobile application for internal company use, using the Windows Mobile 6 Professional SDK. Same old story: I've developed and tested on the emulator and all is well, but as soon as I deploy to advice I get an UnauthorizedAccessException when writing files or creating directories.

I'm aware that an application installed to a device needs to be signed but I'm running into roadblocks at every turn:

  • Using the project properties 'Devices' window I select 'Sign the project output with this certificate, and choose one of the sample certificates from the SDK. This results in a build error: "The signer's certificate is not valid for signing" when running SignTool.
  • If I try to run SignTool.exe from the commandline, I get an error telling me to run SignTool.exe from a location in the system's PATH.
  • I can't use the 'Signing' tab in the Project Properties to create a test certificate - this is greyed out (presumably for WinMobile projects?).

If at all possible, I would like to avoid having to go through Versign or the like to get a Mobile2Market certificate. If I have to go this route for a final version that's fine, but I need to at least be able to test the app on real devices.

Any advice would be most welcome!

A: 

First, make sure you really do need to sign it (you might be able to adjust the device security model).

If you do, then run signtool.exe, but from a Visual Studio command prompt. The easiest way to get there is fromt he Start menu, select Microsoft Visual Studio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt. This will set up all the proper pathing for you.

ctacke
Thanks for the quick response. I used the VS2008 Device Security Manager to try to deploy a 'Security Off' configuration to the device. That seemed to work, but I get the same errors. All I'm trying to do is read/write simple text files from the device's storage card.
AR