Download of CAB from Webform fails on Pocket PC

I am working on a project where I have to enable downloading of CAB
files directly to a Pocket PC (Windows Mobile 2003 Second Edition). On the webform is an image button, the code
behind gets the file (contained in an SQL (2000) table). If the
button on the webform is clicked (on a Pocket PC), the 'save
as' dialog shows the file size and filename correctly and appears to
download. The problem is that the downloaded file just contains the
HTML for the current aspx page.
If the same button is chosen from a PC, everything
works fine for the download. I can even copy the CAB file from the PC
to the Pocket PC, and it installs fine.

Here is the code (VB.NET):

'sql stuff left out

dim buffer() as byte

buffer=cmd.executescalar 'read the binary file info from the db

dim mStream as new MemoryStream(buffer)

response.buffer=true
response.clearcontent()
response.clearheaders()
response.contenttype="applicat­ion/octet-stream"
response.addheader("Content-Di­sposition","attachment;filenam­e=download.cab"
response.binarywrite(mstream.t­oarray)
response.flush

As a side note, I have tried the following (with the same results
mentioned above):
contenttype as "application/exe"
binarywrite(buffer)

Side Note:
The download to the Pocket PC works fine if selected from a hyperlink on an html page.

Is this a PIE issue, or am I missing something simple....

Any insight would be greatly appreciated...

[1569 byte] By [bajansen] at [2007-12-16]
# 1
I ended up solving this another way (by implementing a background download page)....
bajansen at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 2
hi...
I need to something similar to this... please help me.
I need to check the updates of my application which is running on PPC.. so how will i be able to update the s/w from server side... means how will i start installing from server to client's pocket pc? Just like any software on PC tells that update is available and when we click on it.. it starts to update from specific site....

Viral

Viral at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...