Go Premium for a chance to win a PS4. Enter to Win


Windows Mobile 6.5 device cannot invoke web service methods as opposed to Web Application that can

Posted on 2013-11-05
Medium Priority
Last Modified: 2013-11-06
Hi , I have a mobile appplication running on windows mobile 6.5 that has a web reference to a web service hosted on a seperate IIS server (same network). The web reference materialised perfectly. However, when I call any method on the web service from the mobile app (from Visual Studio 2008 on the actual cable connecte device) I get the following error
{"No connection could be made because the target machine actively refused it"}
When I do the same call from a web application, there is no issue. I am realy at wits end because the googled sources are really confusing sometimes......:)
Question by:GoghsEar
  • 2
  • 2
LVL 16

Expert Comment

ID: 39626349
What do you mean by "When I call the same from a web application, there is no issue"?

Can you open the web service address in Internet Explorer Mobile on the device? If not, you have a connection problem.

Author Comment

ID: 39626459
Hi, thanks for the response.
It must be a conection issue... From VS2008 : when running the app on the emulator , I get the error. When running the app on the actual device, while connected via usb to my PC , get the error. However , as soon as I disconnect the device and have a WIFI connection established and given the device a static ip address as part of my network, it works perfectly!

at this stage it is impossible for me to debug my code. I have to make my changes, compile it and deploy it to the device to test and hope for the best.

Verrrryyy frustrating.

PS. When cable connected or on the emulator, I cannot browse to any location in IEM.....
LVL 16

Accepted Solution

hjgode earned 2000 total points
ID: 39626631
There are two options to have a working data connection when the device is connected to ActiveSync (AS)/WMDC (Windows Mobile Device Center):

a) /AcriveSync/WMDC passthru
b) Allow data connection when connected to WMDC/AS

For a) open WMDC:
windows mobile device center image 1
Then click "connect with ...", possibly the option is called differently (I have enabled GuestMode only and do not set a partnership with any of my development devices):
windows mobile device center image 2
Now click "Connection settings":
windows mobile device center image 3
You will get the ActiveSync/WMDC Connection Settings dialog:
windows mobile device center image 4
Here you can enable "Allow data connections on device when connected to PC", which is for option b). BUT the more easier one is to switch the option "This computer is connected to:" to "Automatic" or "The Internet". Sometimes one of both is already selected. If so switch to the other but do NOT select "Work network". The latter is for accessing windows CIFS (server shares) from the device thru WMDC.

b) If you enable "Allow data connections on device when connected to PC", the WiFi connection should remain active also during a WMDC connection. You may then choose "This computer..."="Work network". The device will then use the WiFi connection for internet addresses (dotted addresses).

A "Work" connection is a connection to a not dotted address, like \\Servername\Share.

If you go with option b) you can use remote debugging over WiFi:

1. First start Visual Studio debug with the WMDC connected device. VS will remember the device IP (the WiFi one). Stop either the app or the VS debug session. Then disconnect the device from USB (from WMDC). Now again start a debug session. If the device has still the same WiFi IP and you did not leave VS, the debug session will be started remotely.
I assume here that the device WiFi connects to the same network as the PC.

2. Using a manual or automatic setup on the device and a new device setting in VS you can start and debug apps from VS without having a WMDC connection.
You need some VS files on the device:
[on my PC theses files are at C:\Program Files (x86)\Common Files\microsoft shared\CoreCon\1.0\Target\wce400\armv4i]

Manually launch the conmanclient2.exe and note the IP address of the device.
On the desktop side, open VS 2005/VS2008
Tools - options - device tools - devices
Choose a Windows CE 5.0 or Windows Mobile device, click on “properties”.
On the “... device properties” dialog, click on “configure”.
On the “Configure TCP/IP” Transport dialog, choose “use specific IP address” and type in the IP address of your windows CE/Mobile device.
Click OK.

Change reg key on the device "HLKM\System\CoreConOverrideSecurity = 1"

Run cMaccept.exe on device

Connect to the device from VS within 3 minutes after you run cMaccept.exe.

[source: http://blogs.msdn.com/vsdteam/archive/2005/04/28/413304.aspx]

See also http://www.turboirc.com/ppc/s5.htm for an installer package that automates the device stuff!

Author Closing Comment

ID: 39626712
Wow! What a brilliant response! No room for confusion here! Thank you so much!

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question