This has frustrated me for a while, but seems I found a solution this evening.
I build a lot of Compact Framework apps which communicate via webservices with an asp.net webservice. During development, I prefer to use the built-in web development server instead of having to mess around with IIS etc.
The problem: the web dev server only allows connections from “localhost”, which doesnt include your dev pda, assuming you are using activesync. Long story, but even though the pda can browse the web using your desktop’s ip, it has it’s own local ip which makes the dev web server think it is a remote connection. Thus is winds up blocked.
Solution seems to be, download this tool: http://www.fiddlertool.com
Fiddler is a local proxy which is used for debugging http connections, and is normally used along with asp.net development.
You can disable the logging in fiddler so we’re just using it as a local proxy.
On your windows mobile device, add an http proxy to the connection settings. Use port 8888 (the fiddler default), and use ppp_peer as the host name. Im told that windows mobile 5 and greater use dtpt_peer instead, but I havent tested this yet.
NOW: when you wish to connect to a locally hosted web app or web service from the pda, use this:
where 1234 is your port number and.. you get the idea. *But* notice the single “.” after localhost. This is the magic that makes this work. How? Well, I’ve fought this battle long enough, discovering why is a luxury I don’t have at the moment.