Google Answers Logo
View Question
 
Q: Problem Downloading file with IE and XP SP2 ( No Answer,   2 Comments )
Question  
Subject: Problem Downloading file with IE and XP SP2
Category: Computers > Programming
Asked by: adrok-ga
List Price: $25.00
Posted: 13 Oct 2005 08:50 PDT
Expires: 12 Nov 2005 07:50 PST
Question ID: 579788
I'm having problems forcing the download of a file on a client's
website. We are linking from a Flash file to a zip file for download.
I had to change this so that we now link to an ASP file that forces
the download of the zip file. This works fine for me with IE 6 and XP
SP2, but still causes the following error for my client.
"Internet Explorer cannot download 'filename' from 'internet address'.
Internet Explorer was not able to open the Internet site. The
requested site is unavailable or cannot be found. Please try again
later."

The file is there and downloadable on some machines, but causes this
on others and I can't force users to change security settings. Any
ideas on how to resolve?

Request for Question Clarification by pafalafa-ga on 13 Oct 2005 09:37 PDT
What happens if they right-click and do a "Save target as..."?

Are they still locked out of the download?


pafalafa-ga

Request for Question Clarification by sublime1-ga on 13 Oct 2005 11:19 PDT
adrok...

I suspect that, when you speak of a "forced download", you are
talking about relying on a script to automatically begin the
download, and that you don't have an alternate link set up for
people to right-click and select "Save target as", as suggested
by my colleague pafalafa-ga.

Since there are multiple reasons why a script might fail, given
the use of different browsers and unique security settings and
configurations, most sites which use an automatic download script
also provide a link, and note: "If the download doesn't start
automatically in a few seconds, please click on this link", or
something to that effect. Have you considered such a solution?

sublime1-ga

Clarification of Question by adrok-ga on 13 Oct 2005 14:15 PDT
Yes, sublime1-ga, that is basically the thing. The link is coming from
a Flash file that plays media files, so there isn't currently an html
link that the user could right-click and select "save as". I'm afraid
I may have to go to this, but I was trying to avoid it, as my client
would much prefer a more seamless process for the end user. I'm
forcing the download using VBScript code in an ASP page. I'm currently
trying to similar approaches, that essentially write out the
appropriate headers to the browser. The actual code that I'm using for
one version is below (the other uses the download feature from Persits
ASPUpload).
---------------------------------------------------------------------------

	Response.Buffer = True
	Const adTypeBinary = 1
	
	Response.Clear
	FilePath = "C:\Inetpub\TM_Website\" & sName
	Set objStream = Server.CreateObject("ADODB.Stream")
	objStream.Open
	objStream.Type = adTypeBinary
	objStream.LoadFromFile FilePath
	ContentType = "application/zip"
	Response.AddHeader "Content-Disposition", "filename=" & sName2

	Response.Charset = "UTF-8"
	Response.ContentType = ContentType
	
	Response.BinaryWrite objStream.Read
	Response.Flush
	
	objStream.Close
	Set objStream = Nothing
Answer  
There is no answer at this time.

Comments  
Subject: Re: Problem Downloading file with IE and XP SP2
From: fmjaguar-ga on 02 Nov 2005 14:12 PST
 
try sending these headers:

Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0, false
Pragma: no-cache
Content-Type: application/zip
Content-Disposition: inline; filename=file.zip
Content-Transfer-Encoding: binary

This is of course using the example name file.zip
In addition you could change application/zip to application/octet-stream
or add 'Content-Length: ####'
Subject: Bug in IE
From: cbtl-ga on 17 Nov 2005 05:01 PST
 
Check out this link  http://support.microsoft.com/?kbid=308090

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy