I moved from Foxtrails framework to ActiveVFP because some errors with COM. I am trying to send a file, but I am having trouble writing the contents of a file to the response in ActiveVFP.
In Foxtrails I used in default.aspx
In ActiveVFP I tried to write in main.prg:
oResponse.ContentType = "application/octet-stream"
It works for a text file, but for a binary file (zip archive) it returns only the first couple of bytes.
I think oResponse does not have the WriteFile
from asp.net method because I receive the error
Caught .NET exception, source: <B>MAIN.PRG</B> 00009ag90004 err#= 1426 line= 53 OLE error code 0x80020006: Unknown name.1426
OLE error code 0x80020006: Unknown name.
I also tried with oResponse.BinaryWrite
, but on the client I get a corrupt zip file double in size. I checked it with a hex editor and I saw double bytes instead of single bytes.
I use Windows 7 Ultimate 32 bit.