WebException:ConnectFailure with CF1.1

  • Thread starter Thread starter Jordan Irwin via DotNetMonster.com
  • Start date Start date
J

Jordan Irwin via DotNetMonster.com

I've had this problem for the a while and I cannot seem to find any valuable resources to solve it.

I have designed a PocketPC application running on Windows Mobile 2003. The application calls several Web Service methods which have worked perfectly for months on the Compact Framework 1.0. I have tried updating several of my Pocket PCs to CF 1.1, and each one returns a WebException : ConnectFailure exception when I try to call any of my web methods. I have tried connecting to both a SSL server, and my local machine (not SSL) with no luck. Is there anything I am not doing correctly? Did something change between the releases that I have not seen?


Is there any more information I can provide to help solve this problem?

Thanks,

*****************************************
* This message was posted via http://www.dotnetmonster.com
*
* Report spam or abuse by clicking the following URL:
* http://www.dotnetmonster.com/Uwe/Abuse.aspx?aid=4f4a9571f5764b93bf269365a5cf8c0c
*****************************************
 
You're right, I don't know what I was thinking when I typed 1.1.

The version that is causing problems is CF 1.0.3316.0 to be exact. I know CF 1.0.3111.0 works with my webservices. Thanks for correcting that mistake, and I hope it does not hinder any solutions.

*****************************************
* A copy of the whole thread can be found at:
* http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-compact-framework/9029
*
* Report spam or abuse by clicking the following URL:
* http://www.dotnetmonster.com/Uwe/Abuse.aspx?aid=4c7188f67ef446bca7c9f5fe4c455d67
*****************************************
 
Thanks for the response,

I have read through each of those forums on several occassions, and attempted the different suggestion to no avail. It simply does not allow me to use web services when I am using SP2. Below is the actual code that I am using, it is a very basic webservice call.


....
DataSet dataLogin = new DataSet();
try
{
myWebService ws = new myWebService();
dataLogin = ws.LoginUser(strUser, strPass, out status);
// do some stuff with my data
}
catch (Exception ex)
{
// throw an error
}
....


The exception is as follows:

ex.ToString() = "System.Net.WebException:WebException"
ex.Status = ConnectFailure
ex.Message = "WebException"

Everything else is either a duplicate of beforehand, or null.

*****************************************
* A copy of the whole thread can be found at:
* http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-compact-framework/9029
*
* Report spam or abuse by clicking the following URL:
* http://www.dotnetmonster.com/Uwe/Abuse.aspx?aid=5d5c091d32fd4587bf10959821608a77
*****************************************
 
Thanks for the response Alex,

To answer your question briefly, Yes. The Pocket PC can connect to the webservice via IE. BUT..


Yesterday evening, while installing/uninstalling CF1.0, SP1, and SP2 in different combinations, the webservices began working. I'm not sure what I did, but they now work on the device (Dell Axim x50) when it was running SP2. I then attempted to update another device (HP IPAQ 2215) to SP2 and it did not work. I was receiving the same problems listed before. I then began trying different connection techniques to the webservice, including progmatically resetting the URL of the webservice just before the webmethod call:

....
myWebService ws = new myWebService();
ws.URL = "...my url to the webservice...";
ws.WEBMETHODCALL()
....

The webservice began connecting at this time. Now, I plan to do some more testing (including from a brand new OS install of the devices) to be sure this is actually what is making it work.

Strangly though, is that this URL property is not always set. The logic in my application allows for this particular webservice call to be skipped when certain conditions are met. I have not added the URL property to any other webservice call (same server, web service, etc..) and they all work just fine now.


Any suggestions, explainations?

Thanks again for the current responses.

*****************************************
* A copy of the whole thread can be found at:
* http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-compact-framework/9029
*
* Report spam or abuse by clicking the following URL:
* http://www.dotnetmonster.com/Uwe/Abuse.aspx?aid=78fd8c580f894ca38f692891550c52f5
*****************************************
 
Back
Top