I am having the file download failure where IE does not download a PDF over HTTPS as described here.
The solution seams simple enough, set the proper caching controls. The problem I am having is that no matter what I set the cache control headers to they show with the same values.
Here is the code
context.Response.ClearContent()
context.Response.ClearHeaders()
context.Response.AppendHeader("Content-Disposition", String.Format("attachment;filename=RiskSummaryForm {0}.pdf", intSubno))
context.Response.ContentType = "application/pdf"
context.Response.AppendHeader("Cache-Control", "no-store, no-cache, must-revalidate")
context.Response.AppendHeader("X-Footest", "no-store, no-cache, must-revalidate")
'context.Response.AppendHeader("Pragma", "token")
'context.Response.Cache.SetCacheability(HttpCacheability.Private)
Dim Doc As Document = GACIS.PRB.Doc.RiskSummaryForm.GetPDF(context, DocumentDataFormat.Binary)
context.Response.OutputStream.Write(Doc.DataBinary, 0, Doc.DataBinary.Length)
HttpContext.Current.ApplicationInstance.CompleteRequest()
Here is the raw header from Fiddler2:
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Type: text/html
Expires: -1
Server: Microsoft-IIS/7.5
Content-Disposition: attachment;filename=RiskSummaryForm 300185.pdf
X-Footest: no-store, no-cache, must-revalidate
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Sat, 04 Jan 2014 00:19:01 GMT
Content-Length: 78193
No matter how I change the caching the result is always Cache-Control: no-cache, no-store and Pragma: no-cache.
What could be resetting the cache headers?