Windows Mobile 6: Configuration Steps to Test localhost Web-Services

Windows Mobile 6 offers a great developer experience in Visual Studio 2008. The combined features of WM6 SDK + VS2008 provide excellent new ways for testing your applications for reliability and resiliency. Testing WebServices, however, is not an out of the box experience. So, developers have to take specific steps to make sure they can consume (test) the WebServices hosted locally in the development machine from the emulator.

Following is my suggested sequence of steps you should take to make this work:

1) FROM WITHIN VISUAL STUDIO:

The WebService proxy class will show localhost as the address for the service, if left unchanged the mobile application will never find the actual service as localhost then would be the device itself. Instead change the service URL to http://your-machine-IP-address:port#/service.asmx prior to calling into it.

F5

Activate the Device Emulator Manager (DEM)

2) FROM WITHIN THE DEVICE EMULATOR MANAGER

The device must be in Cradle mode. Right Click on the connected device (i.e. ) and select Cradle. -- Make sure to press Refresh (sometimes the DEM won't show which device is active)

3) FROM WINDOWS MOBILE DEVICE CENTER (WMDC) (This is required to make DMA the transport between the device and the host)

Run WMDC. (Upgrade to version 6.1.6965 if necessary). WMDC should automatically connect to the device. On the device you will see a progress notification similar to this

If WMDC doesn't connect, make sure to check that it is configured to use DMA (Mobile Device Settings | Connection Settings |. Also, you may want to check to make sure the Device transport property within Visual Studio is set to DMA (Tools | Options... | Device Tools | Devices ) , otherwise you should see on WMDC and be ready to go.