I have developed a Pocket PC 2003 app in Visual Studio .NET and am getting an unusual problem i can't get to the bottom of.
My VB.NET Pocket PC App tries to call a simple web method on my webservice from the device using the webserver's IP or Machine name and receives the error "Unable to connect to the remote server".
Yet if i point the device's IE browser to the location of the webservice asmx file (i.e. http://192.168.1.1/mywebservice/testwebservice.asmx) i can successfully see the WebService name and the supported operations in the devices browser window.
I can confirm that the web reference url within my VB.NET PPC project is exactly the same reference as the test in the browser url (http://192.168.1.1/mywebservice/testwebservice.asmx).
Has anyone any suggestions as to why this may be occuring
P.S. This works fine on the emulator.
UPDATE: I have created a very simple webservice that does not involve any server side DLL as i was concerned this may somehow be concealing the real error. All the webmethod does now within my test webservice is return the the string "OK". I still receive the same error when trying to present the return of DoTest() in a messagebox.
The webservice method is as follows:
<WebMethod()> _
Function DoTest() As String
Return "ok"
End Function
I've not actually got my webservice running on a webserver, it is on my laptop and i'm accessing it from my Pocket PC device using the laptops IP/Machine name. Could that cause this problem I don't see why as I can browse to the webservice in the Pocket IE browser.
I'm totally stuck at this point and on the verge of using one of my 2 precious MSDN support calls to microsoft, so PLEEAASSEEE help if you have any suggestions.
Many thanks in advance,
Stew

Pocket PC error: "Unable to connect to the remote server"
halfazner
Cheers Mark!!
Sorry, i should have updated the thread. I've resolved the problem I was encountering.
I hadn't realised that with the Pocket PC version i was required to set the URL of the webservice within code. In the Winforms application this isn't required as it takes the URL from that designated on the webservice.
Cheers anyway...you're a top man!!
Phil Montalbano
Similar question:
I had active sync 3.5 using an older (toshiba e310) pocket pc running on my computer, and I could synchronize without problems with visual studio 2003 (.NET Compact Framework). I am testing a newer pocket pc (hp ipaq 2200), and needed to upgrade. The upgrade to 3.7 (on the cd with the ipaq) did not work, so I uninstalled it and installed active sync 4.1....
I can synchronize my pocket pc with my pc, but I cannot deploy my project. It says connection error (cannot connect to device). I triple checked that the name of the pocket pc was correct (device ID), and that does not seem to be the cause.
Does anyone know how I can deploy my program to the pocket pc
Thanks,
Martina
ajay_dekavadiya
This should help:
http://www.microsoft.com/downloads/details.aspx familyid=7EC99CA6-2095-4086-B0CC-7C6C39B28762&displaylang=en
Please see readme, look for this:
"I uninstalled ActiveSync and then reinstalled it. Now I can’t deploy my application. How do I fix this "
Alberto Canabal
Thank you so much!
It worked!
Thousand thanks to you, Ilya.
Martina
Emoir
I suggest you take a look at your connection settings on your device and compare it to the connection settings on the emulator.
What kind of connection are you using for the device
Are you using Active-Sync,GPRS or a network card
I will suggest you look at
Settings/ Connections tab/Connections/Advanced/Select Networks
And try tweaking the settings you have for Network Management. Notice there are 2 drop downs, One for programs that automatically connect to the Internet and another for programs that connect to a private network.
Also are you using V1 or V2 of the Compact Framework (in other words are you developing your app using VS.NET 2003 or VS.NET 2005)