locked
Can't call web service from Windows Mobile 5 RRS feed

  • Question

  • My vb.net program calls a web service, which works fine on Pocket PC 4.2, but when I run the same program on a Windows Mobile 5.0 (deploying from a VS 2005 project), it doesn't work; here's what I see in the immediate window when catching the exception after my web method call:

    A first chance exception of type 'System.IO.IOException' occurred in mscorlib.dll

    A first chance exception of type 'System.UriFormatException' occurred in System.dll

    A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll

    A first chance exception of type 'System.Net.WebException' occurred in System.dll

    A first chance exception of type 'System.Net.WebException' occurred in System.Web.Services.dll

    ?ex.Message

    "Could not find resource assembly"

    I installed System_sr_enu.cab, but it didn't help with the message.

    I can hit the web service fine running iexplore from both handhelds (Symbol MC9060 and MC9090).

    Any suggestions? Thanks.

    Thursday, February 8, 2007 6:01 PM

Answers

  • Thank you for the feedback. I resolved it by recreating my solution for Compact Framework v2, upgrading from CF1.

    UPDATE: I don't think this lets me use the emulator any more, since the project type is stuck in "Pocket PC 2003", and won't change to "Windows Mobile 5.0 Pocket PC", and the Pocket PC 2003 emulator won't support  CF 2(?). Need to rebuild the solution(?!)

    Tuesday, February 13, 2007 7:30 PM

All replies

  • For starters you should install correct SR CAB to get error message. You can find it here by default:

    "%ProgramFiles%\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v1.0\WindowsCE\Diagnostics\System_SR_ENU_wm.cab"

    Note it’s NETCF V1 CAB since that’s what you’re using. The SR CAB you’ve installed is probably for NETCF V2 which is why it’s not working.

    Thursday, February 8, 2007 10:38 PM
  • Thanks, Ilya. I did indeed have the wrong system_sr_enu.cab file. Unfortunately I still get the "Could not find resource assembly" message even after installing the one you spelled out (with the reboot afterwards).

    I'm looking at upgrading the whole project to CF2 now, since I verified that this web call works from a bare-bones CF2 project on both platforms. (CF2 will give us some additional function we need as well.) Any guidance on converting a CF1 solution to CF2?

    Thanks again.

    Friday, February 9, 2007 2:15 PM
  • I was trying the same with the MC50 today, that has windows ce 2003,

    with VS2005 i only managed to get it working when i used a device application 1.0 project.

    Friday, February 9, 2007 3:07 PM
  • Click on "Project\Upgrade Project", then compile and debug as usual. In many cases it would just work, in some cases you'd need to make some changes.

    Friday, February 9, 2007 5:09 PM
  • Thank you for the feedback. I resolved it by recreating my solution for Compact Framework v2, upgrading from CF1.

    UPDATE: I don't think this lets me use the emulator any more, since the project type is stuck in "Pocket PC 2003", and won't change to "Windows Mobile 5.0 Pocket PC", and the Pocket PC 2003 emulator won't support  CF 2(?). Need to rebuild the solution(?!)

    Tuesday, February 13, 2007 7:30 PM