0

I'm streaming PDFs to the browser, and it works fine. The problem is when someone clicks the save button. On the same server, we have a "Live" and a "test" site. They are identical, and I've verified that all code is identical. However I'm seeing different dialog boxes when the user clicks "Save"

Test site: - dialog box: "Save A Copy"
- file name: "Document.pdf"
- file type: Adobe PDF

Live site: - dialog box: "Save As..."
- file name: "Document.aspx"
- file type: Adobe PDF

To make things even more "fun" I've noticed this behavior ONLY with IE8. With Firefox or Chrome clicking save - regardless of which site (test or live) opens the "Save a Copy" dialog box which allows the users to save the file as a PDF instead of a .aspx file.

Any suggestions are appreciated

Duderino9000
  • 2,535
  • 4
  • 31
  • 37

1 Answers1

1

It might have to do with your IIS mime settings being different between the two servers.

Make sure your HTTP response headers are set properly as well. You'll be able to specify the filename using the content-disposition(?) attachment: filename.pdf (IIRC)

Jason Kleban
  • 20,024
  • 18
  • 75
  • 125
  • Thanks for the response. The IIS mime settings are the same. I'm not sure what you mean by "between browsers" though. And is the content-disposition attachment something I set in code? – Duderino9000 May 19 '10 at 18:26
  • Sorry, I meant between servers. – Jason Kleban May 19 '10 at 18:39
  • I wouldn't focus on the browser behavior, that's a red herring. Instead, look up how to do the streaming and download properly in the ASP.NET side. I don't have any samples for you, I'm sorry. – Jason Kleban May 19 '10 at 18:40
  • No worries, that's what I thought you meant. Still, the settings are the same in IIS. I would think it's an IIS setting, but then why does it work right in Firefox and Chrome for all sites, but doesn't work in IE8 on the live site, but works fine in IE8 on the test site? – Duderino9000 May 19 '10 at 18:41
  • IE8 probably doesn't correct for the difference as FF and Chrome might. Try Fiddler to see all the headers that are part of the request sent to each deployment? – Jason Kleban May 19 '10 at 18:43