View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
Dear sir:
This error happen when I download a ms-word files(MS word 2002,*.DOC).
It will be ok when I download a text file.(*.TXT).
Your are right,I am using the CGI executable, foxweb.exe.
My program's source code list as follow.I compile it to a execute file websrv.exe,
and test it in IE where URL is writing as follow:
 
Thanx!
f.s. chern
===============================================
*websrv.prg
procedure DOWNFILE1
 M.FILENAME="D:\DATA\webhelp.DOC"
 ErrMsg = ""
 Response.Buffer = .T.
 FileExtension = UPPER(JustExt(FileName))
 IF FILE(FileName) AND INLIST(FileExtension, "GIF", "JPG", "JPEG", "DOC", "PDF")
  IF Request.Form("action") = "download"
   ContentType = "application/unknown"
   Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName)
  ELSE
   DO CASE
   CASE FileExtension == "GIF"
    ContentType = "image/gif"
   CASE INLIST(FileExtension, "JPG", "JPEG")
    ContentType = "image/jpeg"
   CASE INLIST(FileExtension, "DOC")
    ContentType = "application/msword"
   CASE INLIST(FileExtension, "PDF")
    ContentType = "application/pdf"
   ENDCASE
   Response.AddHeader("Content-Disposition", "inline; filename=" + FileName)
  ENDIF
  FileContent = ReadFile(FileName)
  Response.AddHeader("Content-Length", Server.ToString(LEN(FileContent)))
  Response.ContentType = ContentType
  Response.Write(FileContent)
  Response.End
 ELSE
  ErrMsg = "Selected file does not exist, or is not of an authorized file type."
 ENDIF
RETURN .T.
 
 
Sent by FoxWeb Support on 06/26/2006 09:52:47 PM:
Does this happen with all file downloads, or specific files?  Is it related to file size, or a specific type of file?  You are using Website as your web server, so I assume that you are using the CGI executable, foxweb.exe, right?

FoxWeb Support Team
support@foxweb.com email

Sent by fs chern on 06/25/2006 08:39:03 AM:
I get the following error in fwstart.log when I test the download.fwx:
 
Error: 1440 Message: "OLE exception error: Exception code c0000005. OLE object may be corrupt" Program: "WWW_READ.FXP" Line Number: 59 Channel: 1
 
I get the same error message when I test by FW2.5,FW 2.6 or FW3.3. What OLE object is it?
 
OS:window 2000 professional
WEB server:website 3.0
 
thanx!!
 
f.s. chern