Search code examples
c#.netinternet-explorer-8export-to-excel

Unable to export to Excel in IE 8


i am unable to export to excel in IE 8. i keep getting the following: "IE cannot download filename.aspx from url." "IE was not able to open this internet site. t he requested site is either unavailable or cannot be found. pelse try again"

looks to me like it's itgnoring the https, and trying to open http, but i could be wrong. per this article: http://support.microsoft.com/kb/323308

my code is:

 StringWriter sw = new StringWriter();
                HtmlTextWriter htw = new HtmlTextWriter(sw);
                gvResources.RenderControl(htw);

                Response.ClearContent();
Response.ClearHeaders()
                Response.AddHeader("Content-Disposition", "attachment; filename=AdHocReport.xls");
                Response.ContentType = "application/vnd.ms-excel";
                Response.Write(sw.ToString());
                Response.End();

Solution

  • the problem was with the IIS application pool. resolved.