IE7 / 8 ignores file download request in popup window
I am using Silverlight and I need to allow the user to save some dynamically scattered files.
For PDF files, I created an http handler and it works great when I open it in a popup.
For Excel files, I've tried every combination of Content-type
and Content-disposition
, but IE8 refuses to open the file. With Fiddler, I can see that you have a very short IE window display, but it closes immediately.
I can't see anything in the error message and I can't find any other description of the problem. IE7 exhibits the same behavior.
I tried Content-type
= application / vnd.ms-excel, application / unknown, application / octet-stream and for that Content-disposition
I tried inline and attachment.
PS: I cannot use the SL embedded storage save dialog because it requires the context to be within the user's reach and I generate the file asynchronously on the server.
source to share
It looks like the automatic download prompt is disabled. See this description for how to turn on automatic suggestion. Enabling auto request worked for me (situation: silverlight app uses Window.Navigate to open a popup for a generic handler that generates the excel file, with content-ordering: attachment that works fine in FF but not IE8). Since this post is already quite old, I'm wondering if you've found a better way to solve this!
source to share
You have to use Content-Disposition: attachment
Have you tried another client? My guess is it is possible that Office is trying to get started and not working.
Alternatively, maybe this is related to http://blogs.msdn.com/ieinternals/archive/2009/10/02/Internet-Explorer-cannot-download-over-HTTPS-when-no-cache.aspx
source to share