Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3434542
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:42:40+00:00 2026-05-18T07:42:40+00:00

I’ve recently developed a web user control that lists a series of reports. When

  • 0

I’ve recently developed a web user control that lists a series of reports. When the user clicks on the report it serves back a CSV file download in the response stream using the following code:

 Response.Clear();

 Response.ContentType = "text/CSV";

 Response.CacheControl = "no-cache";
 Response.AddHeader("Pragma", "no-cache");
 Response.Expires = -1;

 Response.AddHeader("Pragma", "must-revalidate");
 Response.AddHeader("Cache-Control", "must-revalidate");
 Response.AddHeader("Accept-Header", csvResults.Length.ToString());
 Response.AddHeader("Content-Length", csvResults.Length.ToString());
 Response.AddHeader("content-disposition", "attachment; filename=test.csv");
 Response.Write(csvResults.ToString());
 Response.Flush();
 Response.End();

The code initially worked fine in all browsers. Then the client put a requirement to use SSL for the site. As part of this I introduced a global handler to update the protocol from HTTP to HTTPS for all requests as follows:

protected void Application_BeginRequest(Object sender, EventArgs e)
    {
        string requestURL = Request.Url.ToString().ToLower();
        if (requestURL.StartsWith("http://"))
        {
            Response.Redirect(requestURL.Replace("http:", "https:"));
        }
    }

However, since securing the site using SSL the CSV file downloads no longer work for IE although they do continue to work for Firefox / Chrome / Safari.

Is there something I am missing in the headers that is unique to IE in order for the file response to work correctly?

The message I receive from IE is:

“Internet Explorer cannot download
Reports.aspx from …. in ……

Internet Explorer was unable to open
this Internet site. The requested site
is either unavailable or cannot be
found. Please try again later.”

UPDATE:

Here is some example fiddler output coming back from the page request which looks like it’s serving correctly. Why doesn’t IE understand that it’s just been served a file?

HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:23:50 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 4.0.30319
Pragma: no-cache
Pragma: must-revalidate

content-disposition: attachment; filename="test.csv"
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Content-Length: <length value would be here>
Content-Type: text/CSV

"COL1","COL2","COL3"
"VAL1","VAL2","VAL3"
"VAL1","VAL2","VAL3"
"VAL1","VAL2","VAL3"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:42:41+00:00Added an answer on May 18, 2026 at 7:42 am

    After spending hours trying to resolve this I’ve finally came up with a solution.

    Luckily I managed to come across a post by Eric Law regarding IE’s incompatibility between HTTPS and response headers containing cache directives.

    Having now made sure that all response headers were cleared and that no caching instructions were being performed on the response then the file started responding as a download again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I need to clean up various Word 'smart' characters in user input, including but
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.