views:

184

answers:

1

I'm writing a compact framework 3.5 application for a windows mobile device. In this application I'm consuming a web service in order to sync with our database. However, whenever I try to make a call to the web service from the device or the emulator, I get the following error: Invalid URI: Hostname could not be parsed. I'm connected to the network via R-NDIS. The service is running on my development machine right now, and I'm actually able to browse to the asmx page through pocket IE. What am I missing?

Thanks!

A: 

You might not be picking up the proxy server IE is using, or pocket IE might be displaying a cached version of the ASMX page (and thus not really able to access it either). Probably neither one of these is your problem, however.

Update: try putting this in your application's config file:

<configuration>
  <system.net>
    <defaultProxy>
      <proxy autoDetect="true" />
    </defaultProxy>
  </system.net>
</configuration>
MusiGenesis
The proxy seems like it might be valid, but since i'm not connecting through a proxy what would i set it to?
Barry
@Barry: if you have a proxy server entered in pocket IE (and it sounds like you do from your comment, but I'm not sure), that may be why IE is able to reach the ASMX page. If you include the above chunk in your app's config file, your app should pick up and use the same proxy.
MusiGenesis