Popup download file over https

Discussion in 'ASP .Net' started by Passiday, Mar 26, 2009.

  1. Passiday

    Passiday Guest

    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
     
    Passiday, Mar 26, 2009
    #1
    1. Advertising

  2. On Mar 26, 12:38 pm, Passiday <> 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.aspx?scid=kb;en-us;300443
    http://support.microsoft.com/default.aspx?scid=kb;en-us;321532
     
    Alexey Smirnov, Mar 27, 2009
    #2
    1. Advertising

  3. Passiday

    Passiday Guest

    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
     
    Passiday, Mar 30, 2009
    #3
  4. On Mar 30, 5:26 pm, Passiday <> 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...
     
    Alexey Smirnov, Mar 31, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Axel
    Replies:
    8
    Views:
    1,180
    Adrienne Boswell
    Apr 27, 2009
  2. jotto
    Replies:
    4
    Views:
    417
    jotto
    Oct 2, 2006
  3. Naveen Dhanuka
    Replies:
    1
    Views:
    299
  4. Alice Gheorghiu
    Replies:
    6
    Views:
    226
    Alice Gheorghiu
    Jun 17, 2009
  5. Jens Peter Hansen
    Replies:
    7
    Views:
    560
    Randy Webb
    Jun 19, 2004
Loading...

Share This Page