Peter's Gekko

Sponsors

The Lounge

Wicked Cool Jobs

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Connecting to the local network from the Smart Device emulator

Mobile apps make great consumers for a webservice. But debugging such a scenario can be hard to set up. I lost some hair in getting it to work right; but in the end it was simple. There are loads and loads of good manuals how to setup your device, this one on Akhune's blog tells all, up to connecting to the internet from the emulator. All except how to connect to the web server of the PC your emulator is running on. Which didn't work for me and that's what I really needed to debug my app.

In a typical scenario you have one solution with a webservice and the "smart device app"; where the latter has a web reference to the service. The first problem is the URI the smart app needs to contact the service. The emulator has an emulated network card and so becomes part of your network. It will not be able to find localhost, what works well is using the IP address of the PC hosting the emulator. The emulator and the PC are two nodes in the network. To the PC the emulator is an external source trying to access your local web server. By default the Windows firewall prohibits this. I had bumped into this before, this time I had to add the web server (HTTP) protocol to the settings of the Local Area Connection.

Windows firewall

Now the emulator runs as intended. Another great setting of the emulator is zoom under the display options.

It will result in a giant PDA, very readable, very easy to navigate.


Posted Tue, Jul 11 2006 4:05 AM by pvanooijen
Filed under:

[Advertisement]

Comments

Jason Haley wrote Interesting Finds: July 11, 2006
on Tue, Jul 11 2006 10:31 PM
Jason Haley wrote Interesting Finds: July 11, 2006
on Tue, Jul 11 2006 10:33 PM
Peter's Gekko wrote Switching from the VS development server to IIS
on Tue, Sep 12 2006 3:00 AM

By default a web project in VS is hosted by Cassini, the included web-server. Nevertheless I prefer IIS

Peter's Gekko wrote Small presentation woes
on Wed, Sep 20 2006 4:58 AM

Presenting in public, be it on paper, blog or speak is fun. It forces you to formulate your ideas. If

Peter's Gekko wrote Web services on the world wild web
on Thu, Sep 21 2006 5:23 AM

No more lamenting woes, back to real code. This was the core of my SDN presentation . The web is an omnipresent

Joe wrote re: Connecting to the local network from the Smart Device emulator
on Sun, Feb 17 2008 12:49 AM

Thanks - that was a life saver!

Mrsuchon wrote re: Connecting to the local network from the Smart Device emulator
on Wed, Jun 11 2008 6:20 AM

Thanks you veryyyyyy much.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Devlicio.us