I'm trying to develop a module that allows users to search, store metadata, upload and retrieve documents (files of all types) from the database. It works fine, except when the user attempts to "Open" the document in a separate application (not inline with the browser). The application displaying the document (acrobat or word, for example) will return an error that the file can't be found after it's downloaded from the module. I verified the file doesn't exist in the temporary internet files. If the user saves the file or if I change the Content-Disposition from application to inline, the file is saved or displayed correctly. After searching for a solution to this, I found a KB article at Microsoft explains Cache-Control and why I can't open a document with Cache-Control set to Private or no-cache. This makes sense, I don't want my bank account information stored in my temporary internet files. When I try adding any of the following lines, as suggested by the KB article, and use an HTTP Logger, the result is always setting the Cache-Control to no-cache.
Response.AppendHeader("Pragma", "Public")
Response.AppendHeader("Cache-Control", "Public")
or
Response.AppendHeader("Pragma", "")
Response.AppendHeader("Cache-Control", "")
Is DotNetNuke overriding my settings when the page is rendered? Has anyone experienced this? Any help would be greatly appreciated.
Thanks,
Matt