Windows Mobile 5.0 Emulator and Webservice woes November 24, 2006
Posted by suniljagadish in .NET, Windows Mobile.trackback
Many people (including me) have faced the issue of connecting to a webservice from a Windows Mobile 5.0 emulator. The error generally encountered is- “Unable to connect to network”.
I was able to overcome this problem after learning from this post that I need to cradle1 the emulator and then deploy the application. Before you cradle the emulator, make sure you have a compatible version of ActiveSync running on your machine. Configure your ActiveSync to connect using DMA (because the intention is to connect to the emulator).
I used my desktop’s IP address (and not “localhost”, nor the machine name) to add the webreference (of the webserivce) in the mobile device project.
Rest of the steps in cradling the emulator is neatly laid out in this post.
Note:
1. To cradle your emulator, first connect to it using the Device Emulator Manager, only after which the “Cradle” option in the Actions menu will be enabled.
Have you also come across as to how to configure the same for VS 2005 running on Vista as active sync is not supported there and I am unable to make it work via Windows Mobile Device Center – I have installed the exe several times but alas – there is no interface i can find to configure this !! Thanks in advance
@Abhi- So far I haven’t tried this on Vista.
Hi,
I have tried the steps you mentioned in your post but sad to say, it still failed on my trial. Do you have any idea?
Also, have you tried sending mails using web service in Windows mobile 5.0?
I will greatly appreciate your help. Thanks
By the way, im using Windows Mobile 5.0 Pocket PC SDk as my platform.
@ember- Though IP address is the most straightforward way to reference a webservice, try with localhost. Where exactly are you facing the problem? Also, check if the webservice is accessible through your PocketIE directly.
Have you tried using an authenticated web service (not using the default credentials)?
I’ve tried to access the webservice through my pocket IE, sometimes it works and sometimes not. Maybe a problem with my connection?
The problem was solved but im getting an exception – “An existing connection was forcibly closed by the remote host”. “Unable to read data from the transport connection.”
@ember- I haven’t tried WSE on a PocketPC yet. In case it is working intermittently on your PocketIE, I guess it has something to do with your connection. So far, I haven’t come across such a problem. By any chance does it have anything to do with any of your other network connections? Some NAT’ting issue? May be, just a wild guess. One of the reasons you get that exception is because of a message size greater than allowed size on that channel.
“One of the reasons you get that exception is because of a message size greater than allowed size on that channel.” –
Any idea how to solve this?
I mean how to adjust the allowed size in a channel. Thanks in advance.
@ember- I’m sorry, I am not aware of the method to adjust the allowed channel size.
Abhi, I am facing the same problem with Vista, Windows mobile center. Please let me know if you have been able to solve the problem
I Hv sm comments on d WS prt..
First of all..refrencing d WS by “localhost”.. wont wrk..Plz put d ip addr in place bcz after synchronizing..d mobile device is nt dependent on d physical addr..so use d ip..
Nw cmng to d auth WS..u using encrytion or nt??if yes..u”l be needing security certificates on ur mobile device..dey”l be smwhere in ur mobile sdk onle..u cn read more on security issues on MSDN..
Thank you
i have a same problem.^^