DotNetSurfers

Latish Sehgal's Blog

Connecting to a Local Resource or Service From the Smart Device Emulator in Visual Studio

I am working on a project right now that has a smart device component, and we use the Pocket PC 2003 SE Emulator to test and debug the application locally. It took me a while to get the environment setup for the first time; hopefully this post can save some time for other people. This post helped me in getting the emulator connected to the internet. Accessing a web service on my local computer from inside the emulator was a little harder to figure out. It turns out that:

  1. You cannot use ‘localhost’ from inside the emulator to refer to your local PC. You have to use either the computer name or the IP address. However, even after I use the computer name, I get this when trying to access a local resource.
    emulator1

  2. The Windows firewall blocks the emulator from accessing anything on port 80 by default. I had to pull up the Windows Firewall settings and create a new Inbound Rule (I am using 64-bit Windows 7 here). The screenshots below should be self-explanatory.
    firewall6 firewall1firewall2

firewall3 firewall4 firewall5

And Voila! The emulator is now able to access local resources.

emulator2

Comments