• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2302
  • Last Modified:

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

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......:)
0
GoghsEar
Asked:
GoghsEar
  • 2
  • 2
1 Solution
 
hjgodeCommented:
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.
0
 
GoghsEarAuthor Commented:
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.....
0
 
hjgodeCommented:
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:
Clientshutdown.exe
ConmanClient2.exe
CMaccept.exe
eDbgTL.dll
TcpConnectionA.dll
[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!
0
 
GoghsEarAuthor Commented:
Wow! What a brilliant response! No room for confusion here! Thank you so much!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now