Jaa


File Download in IE6

Setup

  • We moved the file download portion of our ASP.NET 3.5 WebForms application to MVC

Symptoms

  • When IE6 users tried to open a file (text, Word doc, PDF, etc) through the new MVC controller action, the appropriate application would launch and fail with a “file not found” error
  • If the users clicked “Save” instead of “Open” in the file download dialog, they were able to open the downloaded file without issue
  • IE7, IE8, and Firefox users were unaffected

Solution

  • The issue lies in the way IE6 handles the NoStore caching instruction on the OutputCache attribute
  • Removing the no-store instruction from the file download controller action solved the problem.
  • What I think happens here is that IE7 and IE8 ignore the no-store instruction when downloading a file (as opposed to loading html content, for example).  IE6 takes the no-store instruction literally and will not store the document in the cache at all.  The problem is that when you click open on the file download dialog, the browser needs to store the file in temporary storage (the cache) before loading it.