Downloading binary data to the Pocket PC via Web Services

  • Thread starter Thread starter Thore Berntsen
  • Start date Start date
T

Thore Berntsen

I'm thinking on how I can get my application upgraded remotly. And I have
the following idea:

If I develop a web service where the device can ask the server once a day if
there is an upgrade available, can I then use a web service to download the
Cab file?

I don't know if this is a stupid idea or not. Does anyone have any
experience to share? I suspect the Web Service will give quite a lot of
overhead.

Does anyone know where I can find a demo of sending data binary with a web
service?

Thore Berntsen
Norway
 
We do automatic update via WebService that way:

- on the server side, the ".EXE" file is read into an array using a FileStream
- the resulting array is compressed using #ziplib
(from http://www.icsharpcode.net/)
- the compressed array is stored into an "Image" field into MSSQL.
- using Web service, we send the "Image" field into the device.
- on the device, the running ".EXE" file is renamed to ".OLD"
- the field is read, decompressed, then copy into the ".EXE"
- if the CheckSum (Adler32, from #ziplib) is ok->delete the ".OLD" file.
- run the new executable (using OpenNETCF.WinAPI.Core.ShellExecute)
- finally the old application closes itself.

We are in an early stage of development, but it works.
We did'nt measure the WebService overhead yet.

Nicolas.
 
You also need to keep in mind that you need to some how invoke the installer while your application is not running. So the process would be

1) check for updat
2) download updat
3) shutdown applicatio
4) install CA
5) re-start applicatio

The easiest solution is to obviously have step 1 be part of your base app, then have steps 2-5 be part of a seperate executable. I've been debating whether or not to build this functionality into my own application. I believe it to be a useful idiot-proof system and it doesn't necessarily require an ActiveSync connection

~~

----- Thore Berntsen wrote: ----

I'm thinking on how I can get my application upgraded remotly. And I hav
the following idea

If I develop a web service where the device can ask the server once a day i
there is an upgrade available, can I then use a web service to download th
Cab file

I don't know if this is a stupid idea or not. Does anyone have an
experience to share? I suspect the Web Service will give quite a lot o
overhead

Does anyone know where I can find a demo of sending data binary with a we
service

Thore Berntse
Norwa
 
Back
Top