I am having a terrible time getting a webpage to work and could really some help. The page is served via IIS 7 with SSL enabled. On it, the user can download an .rtf document or a .zip of multiple .rtf files. This works perfectly fine in FF and Chrome, but as soon as IE is introduced, the end user gets a popup with the following error:
Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
Using Fiddler, I can see that the header has Cache-Control set to No-cache and the Pragma is set to no-cache as well. Based on several forums and blogs, this causes IE to disallow downloading of files from the page.
I have tried to change the headers in the ASP.NET codebehind like this:
Response.AppendHeader("Pragma", "public");
Response.AppendHeader("Cache-Control", "must-revalidate,
post-check=0, pre-check=0");
Response.AppendHeader("Cache-Control", "public");
and this:
Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.SetMaxAge(TimeSpan.FromMinutes(1));
Response.Cache.SetValidUntilExpires(true);
none of which works. The headers are still set as no-cache.
I then tried to add custom header modifications to the website via IIS HTTP Response Headers module, but that isn't working either.
This thread comes close to answering my question but doesn't specify how they were able to rewrite the headers.
I will greatly appreciate any help you folks can give me as I am pulling what's left of my hair out.