Welcome to MSDN Blogs Sign in | Join | Help

"Internet Explorer cannot download <filename>" in Report Viewer controls

This week, I spent a fair amount of time dealing with a customer who had issues opening up SSRS reports exported into Word, Excel, and PDF. They used both the webform Report Viewer control and a custom control which added a content disposition header for the document type in question to the response and then wrote it out to the browser (see http://support.microsoft.com/default.aspx?scid=KB;EN-US;q306654&ID=KB;EN-US;q306654&lex for more details).

 

While using the Report Viewer, this error got thrown:

 

Internet Explorer cannot download … from SomeSite

Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.

 

When in their custom control, we’d see an error like this (from the app which should have opened the document: Word, Excel, whatever):

 

The file could not be found. Try one or more of the following:

  • Check the spelling of the name of the document
  • Try a different file name

(C:\...\TempFolderName\DocName.doc)

 

The customer was also using a third party ISAPI filter to implement security on IIS.

 

Long story short, we were running into the behavior described in the following article:

 

http://support.microsoft.com/default.aspx?scid=kb;en-us;316431

 

Our problem was actually masked by a number of factors. It turns out, we had two things going on:

 

  • Even though SSL was not configured on IIS, the customer had an ISAPI filter installed which used SSL under the covers to do encryption
  • The ISAPI also automatically added the CacheControl: no-cache header to the response (You can use Fiddler from www.fiddlertool.com/ to check the headers yourself)

 

…and as the article above states, if one uses SSL and the no-cache header gets sent down, we will NOT cache the files in question…So we were pretty much deleting the office docs right after they made it to the client, but before we could display them (My customer used filemon to watch iexplore.exe do this, actually)…

 

So, even though this isn’t really an SSRS problem per-se, here are the takeaways:

 

  • Verify whether you are using SSL or not, even if you know you haven’t actually configured SSL on your website
  • Use Fiddler to see if the no-cache header is being sent down. 
Published Friday, April 21, 2006 6:22 PM by russch

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Friday, September 22, 2006 7:33 AM by Kate the great
I had this error recently on 1 out of 4 servers that we use. I finally found that one of the directories under IIS5 had the nasty "Pragma: No-Cache" setting under Http Headers -> Custom HTTP Headers.  Hope this can help someone else out there.

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Friday, September 29, 2006 1:00 PM by Sean P. O. MacCath-Moran
Greetings,

Many thanks for this artical - it helped me to get to my solution. In my case, I'm running Apache and serving a dynamically generated PDF file that downloads fine in all popular browsers but IE. My working solution was to add the following lines prior to my other header outputs:

/**
* The following Pragma and Cache-Control lines are necessary
* as the overcome an issue that IE has in some server configurations
* when the no-cach header is sent. The two lines override these
* headers, allowing IE to proceed. When not turned on, the error IE
* provides is:
*   Internet Explorer cannot download <item URL here instead of item file name> from <domain>.  
*  
*   Internet Explorer was not able to open this Internet site. The requested site is either
*   unavailable or cannot be found. Please try again later.
*/
header("Pragma: public");
header("Cache-Control: max-age=0");

Sean P. O. MacCath-Moran
www.emanaton.com

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Tuesday, November 14, 2006 5:54 PM by florsita

THANK YOU!!!!  i've waded through a pile of pages trying this and that -- clearing cookies, checking for spyware, repairing IE, nothing worked.  downloading fidler and seeing what headers are actually being sent showed me that, indeed, "no-cache" was being set, so Response.ClearHeaders() and setting headers to "Pragma:public" and "Cache-Control:max-age=0" made it work.  My app works again!  THANK YOU, THANK YOU, THANK YOU!

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Thursday, November 30, 2006 11:59 PM by Sean P. O. MacCath-Moran

*tips his hat*

I'm glad it worked out for you, florsita.  =o)

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Wednesday, January 24, 2007 9:20 AM by Reena

I am facing the same problem. But when I checked my server, I found that there was no IIS installed at all! Still trying to figure out what the problem could be :(

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Friday, June 01, 2007 4:15 AM by Arttu Arstila

Hi, I am having the same problem with MOSS2007 & SQL 2005 Reporting Services add-in, cannot export reports to file. Any ideas how MOSS headers could be configured?

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Monday, June 04, 2007 7:35 AM by Arttu Arstila

I had the same problem with MOSS & RS add-in, although the cache header was set to "private". The problem was solved by unchecking the "Do not store encrypted pages on disk" setting from IE7 advanced settings (in fact it was in our GPO).

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Friday, September 28, 2007 9:17 AM by Wendy Kleu

Thanks to Sean P. O. MacCath-Moran -

your Pragma and Cache-Control headers solution sorted out my client's error when trying to export to excel (IE6, but with company encryption layers causing no-cache).

Very useful, thank you.

# Copyright Revewals &raquo; Russell Christopher&#8217;s Semi-Useful BI Musings : Internet Explorer &#8230;

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Tuesday, May 06, 2008 9:31 AM by Dan

You are a GENIUS, and have saved me hours of pointless and fruitless messing around trying to resolve this issue!.

Great.

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Friday, July 18, 2008 11:46 AM by Nick

Thanks much to Sean, your fix helped me out as well!

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Monday, September 29, 2008 7:19 PM by Michael Rodriguez

Okay, I've inserted Pragma for the header name and Public for the value.  I also inserted Cache-Control for the name and max-age=0 for the value.  I don't know if I'm missing quotes or not but I can't get IE to work when I right mouse click and unregistered Mime-type and try to save it to my desktop in IE.  Firefox is fine but not an option for the client.

Help!

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Friday, December 19, 2008 2:37 PM by Gita

Hi,

This helped me in resolving my issue. I was setting the pragma:no-cache http header in my code. So I was not able to export reporting services report into excel, csv or pdf. After removing the code, it solved for me.

Fiddler helped in finding wether no-cache header was being sent or not

Thanks a lot for your help.

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Sunday, January 11, 2009 6:20 AM by cesar

im trying to open files from microsoft word from my school course website. but every time i click on the file it tell me Internet Explorer cannot download <filename> from (website)im not verygood with comuters. could you tell me how to fix this problem in some detail plz... thanks

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Sunday, January 11, 2009 6:37 AM by cesar

i found this but i have no idea on how to get to it, could you help me plz

How to Set HTTP Headers for Content Expiration:

To set content expiration for a Web site, for a virtual folder, or for a file, perform the following steps:

1.Start Internet Services Manager, or open the MMC that contains the IIS snap-in.

2.In the Internet Information Services dialog box, click to expand * server_name, where server_name is the name of the server.

3.Right-click the Web site, folder, or file for which you want to set content expiration (for example, click Default Web Site), and then click Properties.

4.Click the HTTP Headers tab.

5.Click to select the Enable Content Expiration check box.

6.In the Content should box, perform one of the following steps:

Click Expire after, and then specify a period of time (in minutes, hours, or days) after the content that expires in the appropriate boxes.

Use this option if you want Web content to expire after a specific length of time.

-or-

.Click Expire on, and then click an expiration date and time in the appropriate boxes.

Use this option when you want Web content to expire after a specific date and time.

7.Click OK, and then quit Internet Services Manager, or close the IIS snap-in.

# MOSS &amp; Reporting Services integration and report export over SSL | keyongtech

# Russell Christopher s Semi Useful BI Musings Internet Explorer | Paid Surveys

# re: "Internet Explorer cannot download <filename>" in Report Viewer controls

Wednesday, June 03, 2009 7:58 PM by exi.mres

We had this problem on one machine... the following steps fixed it :)

1. In Internet Explorer, select "Internet Options..." from the "Tools" menu.

2. Click on the "Advanced" tab.

3. Scroll down to the "Security" section.

4. Un-tick the "Do not save encrypted pages to disk" check box.

5. Click the "OK" button.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker