Solved

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

Posted on 2013-11-05
4
1,948 Views
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......:)
0
Comment
Question by:GoghsEar
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:hjgode
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.
0
 

Author Comment

by:GoghsEar
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.....
0
 
LVL 16

Accepted Solution

by:
hjgode earned 500 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:
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
 

Author Closing Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Trouble with References... 5 25
Setting runtime form location 4 19
Spacing between controls 4 17
Saveas need to save a copy 16 11
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now