Consuming Web Service from Mobile 5.0


G

Guest

Hi All,
I've developed a stand alone application in VS 2005 for Windows Mobile
5.0. In this I'm trying to connect to Web service to get some data. But I'm
unable to connect to web service from Mobile 5.0 actual device. I'm getting
exception as "System.Net.WebException". But I'm able to access the same URL
from the Mobile Browser. The same application works fine 2003 Emulator. Is
there any setting required for VS2005 or Windows Mobile 5.0 net work settings.
 
Ad

Advertisements

S

Simon Hart

You need to get the HttpWebResponse in order to get more information on the
WebException. It could be because of anything.

Regards
Simon.
 
G

Guest

Hi Simon,
Thanks for your reply. I've tried to do the same. Exception detail is
"Could not establish connection to network". I've checked the network
connection, it is connected to work network. Even i'm unable to access the
web service.
 
Ad

Advertisements

S

Simon Hart

Hi Chandra,

What is the StatusCode and StatusDescription of the HttpWebResponse object?
Also are you using DNS or IP address?(ResponseUri.HostNameType) Have you
tried using both?

When you navigate using PIE on the device, are you using the same
HostNameType DNS/IP as you are in code? Are you sure the Uri property of the
web service proxy in your code is set to the same url as you have keyed in,
in PIE? For example if the web service in a subdirectory of the Virtual
Directory, ensure you are specifying the correct path in the Uri.

HTH,
Simon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top