Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Popup download file over https

Reply
Thread Tools

Popup download file over https

 
 
Passiday
Guest
Posts: n/a
 
      03-26-2009
Hello,

I am sorry if this is inappropriate here to ask question about the
classic ASP. I am quite sure though that the question is relevant also
to ASP.NET, so I dare to post it here. The classic ASP groups seem to
be quite discontinued...

In my ASP project, I used to use this code for initiating "Save as"
download at the client side:

Response.ContentType = "application/msword";
Response.AddHeader("Content-Disposition", "attachment;
filename=MyReport.doc;");

This code is ran in hidden frame, and had been working very fine.
However, when I switched the project to https, this kind of code now
throws error:

Internet Explorer cannot download ReportDOC.asp from www.domain.com.
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 hope this is not anyhow connected to the client settings. Maybe
there is some header I should add to the response, to make the
download work just like it works over http?

Passiday
 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      03-27-2009
On Mar 26, 12:38*pm, Passiday <(E-Mail Removed)> wrote:
> Hello,
>
> I am sorry if this is inappropriate here to ask question about the
> classic ASP. I am quite sure though that the question is relevant also
> to ASP.NET, so I dare to post it here. The classic ASP groups seem to
> be quite discontinued...
>
> In my ASP project, I used to use this code for initiating "Save as"
> download at the client side:
>
> Response.ContentType = "application/msword";
> Response.AddHeader("Content-Disposition", "attachment;
> filename=MyReport.doc;");
>
> This code is ran in hidden frame, and had been working very fine.
> However, when I switched the project to https, this kind of code now
> throws error:
>
> Internet Explorer cannot download ReportDOC.asp fromwww.domain.com.
> 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 hope this is not anyhow connected to the client settings. Maybe
> there is some header I should add to the response, to make the
> download work just like it works over http?
>
> Passiday


What version of IE do you use? Does it work in Firefox? Is there any
difference if you put it out of frame, or with inline value instead
of attachment? In IE there are few things you may check

http://support.microsoft.com/default...b;en-us;300443
http://support.microsoft.com/default...b;en-us;321532
 
Reply With Quote
 
 
 
 
Passiday
Guest
Posts: n/a
 
      03-30-2009
Hello Alexey,

Thank you for your response.

> What version of IE do you use? Does it work in Firefox? Is there any
> difference if you put it out of frame, or with inline value instead
> of *attachment? In IE there are few things you may check


On Firefox the download behaviour is correct. This really is problem
only on MSIE. Commenting out the attachment header does not fix it.

Unfortunately the two links you mentioned do not apply here. I don't
see any specific security setting that would relate to downloads over
https connections, and also this is not the case when the response is
result of POST request. It's a GET request.

I thought this might have something to do with content expiration, so
I went to check the server settings (IIS website properties, HTTP
Headers, Enable content expiration -- unchecked). But, that seems to
have no relationship with the problem.

I also read that it's bad to do over https things like

response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");

but, I keep getting the same error, also when those lines are
commented out.

I've been reading all over the Internet, but no KB articles helped.
Right now I am writing to my customer (it's an intranet site) --
please consider switching to Firefox, at least until this problem is
resolved. Kind of sad outcome...

Passiday
 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      03-31-2009
On Mar 30, 5:26*pm, Passiday <(E-Mail Removed)> wrote:
> Hello Alexey,
>
> Thank you for your response.
>
> > What version of IE do you use? Does it work in Firefox? Is there any
> > difference if you put it out of frame, or with inline value instead
> > of *attachment? In IE there are few things you may check

>
> On Firefox the download behaviour is correct. This really is problem
> only on MSIE. Commenting out the attachment header does not fix it.
>
> Unfortunately the two links you mentioned do not apply here. I don't
> see any specific security setting that would relate to downloads over
> https connections, and also this is not the case when the response is
> result of POST request. It's a GET request.
>
> I thought this might have something to do with content expiration, so
> I went to check the server settings (IIS website properties, HTTP
> Headers, Enable content expiration -- unchecked). But, that seems to
> have no relationship with the problem.
>
> I also read that it's bad to do over https things like
>
> response.setHeader("Cache-Control", "no-cache");
> response.setHeader("Pragma", "no-cache");
>
> but, I keep getting the same error, also when those lines are
> commented out.
>
> I've been reading all over the Internet, but no KB articles helped.
> Right now I am writing to my customer (it's an intranet site) --
> please consider switching to Firefox, at least until this problem is
> resolved. Kind of sad outcome...
>
> Passiday


what you can try is to check if ASP.NET returns the same HTTP response
to FF and IE. You can use Fiddler or similar. Maybe there is a
difference, I don't know. I will try to check it as well, not sure
where can I play with https...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
server side redirect https => https NOT working Axel ASP General 8 04-27-2009 02:02 AM
VOIP over VPN over TCP over WAP over 3G Theo Markettos UK VOIP 2 02-14-2008 03:27 PM
https authentication & storing https page in string Naveen Dhanuka Ruby 1 09-19-2007 02:05 PM
open-uri and HTTPS, or net/https with a redirect jotto Ruby 4 10-02-2006 07:26 AM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments