I have an HTC Dash (a Windows Mobile 6 Standard device) and am a developer, so of course I’d like to play around with writing applications for it. I downloaded the latest SDK and created a sample app in Visual Studio 2008. I was able to deploy to an emulated device, and all was well.
That is, until I decided to have my application attempt to fetch some data from the Internet. Since the emulated device isn’t a real phone, it doesn’t have a data plan, of course. It also doesn’t have Wi-Fi. But since it’s running on a desktop machine, it should be able to use the host’s network connection, right? If only it were that easy. There is a setting to use the host’s network interface, but attempting to turn it on while on a Windows Server 2008 machine gives you the notification that you need something from Virtual PC 2007! Fortunately, installing Virtual PC did the trick, and I was able to start testing the app on the emulated Windows Mobile device.
The next step was to deploy the app to my actual phone. Since the Windows Mobile Device Center was able to see and sync my phone, connecting with Visual Studio should have worked, right? Sadly, it failed to connect at all! Further, none of the documentation I could find gave any clue about fixing the problem. Guessing that the security on the phone was preventing the connection, I would have used the Security Configuration Manager from the Windows Mobile SDK to change the settings... but of course that tool couldn’t connect either!
The solution? The SDK includes security configuration files (.cpf) that can be manually copied to your device and executed. In order to get Visual Studio to connect successfully, I had to run both the “SecurityOff.cpf” and “RapiAllowed.cpf” files (in that order). No other more-secure combination seemed to work, even though all the documentation seems to indicate that it should.