Download of CAB from Webform fails on Pocket PC
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="application/octet-stream"
response.addheader("Content-Disposition","attachment;filename=download.cab"
response.binarywrite(mstream.toarray)
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...

