We are encountering a sporadic problem where if an Internet
Explorer user
clicks on a link to download a document AND then chooses the option to
automatically "Open" the document (as opposed to download it), then
that
user's default application (Word or WordPad) will give a "File
Cannot be
Found" error. The applications appear to be looking for the
document in a
temporary folder used by IE. A manual inspection appears to confirm
that the
document is not there.
The headers are as follows when attempting to use an affected
computer to
download/open a document from my site (I have included the GET
section in
case it is meaningful - apologies for the length it adds)...
HTTP/1.1 200 OK
Server: 4D_WebStar_D/7.4
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 13 Apr 2006 05:25:15 GMT
Content-Disposition: attachment;filename=Emmitt,Amandacv.doc
Content-Type: application/msword
Date: Thu, 13 Apr 2006 05:25:15 GMT
Last-Modified: Thu, 13 Apr 2006 05:25:15 GMT
Content-Type: application/msword
Content-Length: 49664
The following is the equivalent using the same affected computer to
download/open the same document from our .net developers site...
HTTP/1.1 200 OK
Date: Thu, 13 Apr 2006 05:24:16 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
content-disposition: attachment; filename="158Emmitt,Amandacv.doc"
Cache-Control: private
Content-Type: Application/msword
Content-Length: 49664
The important difference I immediately see is that the Active4D
version will not be cached and expires immediately. I am guessing
reason IE is failing is this:
- IE downloads the document to a temporary folder, perhaps its cache
- Before opening the document in its viewer, it sees the document has
expired and should not be cached and deletes it
- When the viewer opens the document is no longer there
I think you can solve the problem by calling 'set cache control
("private")' before returning the document. That will remove the
Pragma and Expires headers as well.
Regards,
Aparajita
www.aparajitaworld.com
"If you dare to fail, you are bound to succeed."
- Sri Chinmoy | www.srichinmoylibrary.com
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/