J
Jay Donnell
I have a asp script that creates a text file for download. It works
perfectly under http but breaks under https. Here is the error I get
in IE when I try to download it.
Internet Explorer cannot download (the url of the page is here) from
(the
website is here).
Internet explorer was not able to open this Internet site. The
requested
site is either unavailable or cannot be found. Please try again later.
I have read other posts about this problem, but none of them helped
me. What is the trick to getting this to work?
code:
Response.Clear
'-- the filename you give it will be the one that is shown
' to the users by default when they save
Response.AddHeader "Content-Disposition", "attachment;
filename=" & objFile.Name
Response.AddHeader "Content-Length", objFile.Size
Response.ContentType = "application/octet-stream"
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
'-- set as binary
objStream.Type = 1
Response.CharSet = "UTF-8"
'-- load into the stream the file
objStream.LoadFromFile(strAbsFile)
'-- send the stream in the response
Response.BinaryWrite(objStream.Read)
objStream.Close
perfectly under http but breaks under https. Here is the error I get
in IE when I try to download it.
Internet Explorer cannot download (the url of the page is here) from
(the
website is here).
Internet explorer was not able to open this Internet site. The
requested
site is either unavailable or cannot be found. Please try again later.
I have read other posts about this problem, but none of them helped
me. What is the trick to getting this to work?
code:
Response.Clear
'-- the filename you give it will be the one that is shown
' to the users by default when they save
Response.AddHeader "Content-Disposition", "attachment;
filename=" & objFile.Name
Response.AddHeader "Content-Length", objFile.Size
Response.ContentType = "application/octet-stream"
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
'-- set as binary
objStream.Type = 1
Response.CharSet = "UTF-8"
'-- load into the stream the file
objStream.LoadFromFile(strAbsFile)
'-- send the stream in the response
Response.BinaryWrite(objStream.Read)
objStream.Close