473,394 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

https and file downloads

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
Jul 19 '05 #1
2 3031
What happens when you just drop a text file in the same directory and try to
fetch it at https://yourdomain/yourfile.txt?

Ray at home

"Jay Donnell" <ja********@gmail.com> wrote in message
news:9c**************************@posting.google.c om...
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

Jul 19 '05 #2
It works fine. I think it might be a problem with the way I'm setting
the headers, but I'm really not sure.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<#T**************@TK2MSFTNGP10.phx.gbl>...
What happens when you just drop a text file in the same directory and try to
fetch it at https://yourdomain/yourfile.txt?

Ray at home

"Jay Donnell" <ja********@gmail.com> wrote in message
news:9c**************************@posting.google.c om...
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

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Phillip | last post by:
Hi. I'm having some anoying trouble trying to establish a https connection. I've even switched Python Versions (from 2.2.3 to 2.3.3), but the Errors remain basically the same, allthough they now...
0
by: Robert | last post by:
did you solve this problem? It seems to be still present here with py2.3.5. Robert -- From: Manish Jethani <manish.j@gmx.net> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;...
1
by: Camel | last post by:
Hello All, I have a short program (see below ) that downloads a secure page. It worked fine when I changed in the InternetConnect function server name to: www.paypal.com port to:...
2
by: Mark Delon | last post by:
Hi, i want to log via python script to https page: 'https://brokerjet.ecetra.com/at/' # But it does not work. I am using following code(see below)
3
by: Mark | last post by:
Hello all - This has been frustrating me long enough that I'm willing to appeal to the gurus out there to put this in my rear view mirror. I'm trying to access a JPEG file that I have within my...
1
by: Ryan Pedersen | last post by:
I have been trying to figure out how to transmit a file back to a user using the response.transmitfile or response.writefile method and just not having much success. I have a dell server running...
2
by: Nader Shahin | last post by:
I tried to develop an application to download a file from an Https server. My application was able to download a file from a regural Http server. I used a WebProxy and i passed the...
4
by: gavkel | last post by:
Can anyone get this to work? All Im getting is the login html being downloaded. Would appreciate any help - my heads hurts Thanks Gav
3
by: assaf | last post by:
(warning Python newbie) I'm trying to use Python to work with del.icio.us's API. Basically, I need to be able to do a simple https post, with username/password authentication. (For those...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.