Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Windows 2008 R2 (virtual) server running a number of websites. My client has uploaded several PDFs by FTP to a download directory from where they can be retrieved via a web page.

This works fine in IE and Safari, but when attempting to download with Firefox or Chrome both browsers hang and Firefox posts 'stopped' in the status bar at the bottom of the page. We've tried this on several PCs at different locations so I think this might be a server problem - although conceivably the software used to generate the PDFs may have produced something incompatible with streaming to Firefox/Chrome.

Why reasons could there be to produce this behaviour? Is there some configuration setting I need to change?

EDIT: Checked headers with Firebug - a GET sticks with a 206 Partial Content

Content-Type    application/pdf
Last-Modified   Sun, 21 Mar 2010 19:50:49 GMT
Accept-Ranges   bytes
Etag    "42da4bce2fc9ca1:0"
Server  Microsoft-IIS/7.5
X-Powered-By    ASP.NET
Date    Thu, 27 May 2010 15:39:34 GMT
Content-Length  329532
Content-Range   bytes 27484-357015/357016
Request Headersview source
Host    www.caepost.co.uk
User-Agent  Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-gb,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive  115
Connection  keep-alive
Range   bytes=27484-357015,27484-27485
share|improve this question

3 Answers

IIS version 7.5 changed the way it responds to byte-range requests, such as those made by the Acrobat plugin. If the request is for a single contiguous range, IIS now reponds with the "Content-Range" header rather than "ContentType: multipart/byteranges" header, which is actually valid HTTP, but it confuses the Acrobat plugin.

Adobe are currently working on a fix: http://kb2.adobe.com/cps/807/cpsid_80780.html

And in the meantime, Microsoft have provided a hotfix to make IIS 7.5 go back to the old behaviour: http://support.microsoft.com/kb/979543

share|improve this answer

Can you post the response headers being sent?

Firebug Net panel:
alt text

Headers view:
alt text

share|improve this answer
Where would I find those? Sorry - I'm a developer rather than a sysadmin and I just maintain the server for a few client's systems – Cruachan May 27 '10 at 13:43
Download firebug for firefox and use the net panel and the "Persist" button to view the headers. – David Murdoch May 27 '10 at 14:25
You may also be able to do this in Chrome. Press Ctrl+Shift+i, open the resources panel, enable resource tracking, (re)load your PDF, view headers. – David Murdoch May 27 '10 at 14:35
Firebug reports two GETs, the first returns 200 OK, the second a 206 Partial Content - posted as an edit above. – Cruachan May 27 '10 at 15:42
hm, I've never noticed the Range and Content-Range headers before. You may want to look at the Content-Range spec (note: I'm not really sure if Content-Range is causing a problem). You may want to try your luck on stackoverflow...although they may just send you back here...just try to make it sound programming-related. – David Murdoch May 27 '10 at 16:50

We upgraded servers and IIS 7.5 gave us this same issue. Checked the headers and confirmed the issue.

Applied the hotfix http://support.microsoft.com/kb/979543 but that did not solve the problem. I think the difference here is that our site was running in classic mode. (Had to do this for another product (Imis) installed). So it seems the hotfix only works if your site is running on Integrated mode.

In the end I had to write a handler to catch pdf document requests and change the response header.

context.Response.ContentType = "application/pdf";
context.Response.TransmitFile(filePath);
context.Response.End();

That did the trick.

The sysmptoms were not just limited to Acrobat opening the documents. In our case google chrome was also hanging when it tried to open the pdf, regardless of what pdf reader you have.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.