IE 7 & 8 both throw an error when users attempt to download a csv file over https.
Internet Explorer cannot download downloadPage.jsf. Internet Explor
Had the exact same issue when the app server was configured to use SSL. The trick for me to get it working after the https was turned on:
string attachment = "attachment; filename=" + rptName + ".xls" + "";
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearHeaders();
HttpContext.Current.Response.AddHeader("content-disposition", attachment);
HttpContext.Current.Response.AddHeader("Cache-Control", "private, max-age=1");
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Cache.SetExpires(DateTime.Now.AddMinutes(1));