IIS 7 & IIS 8
PDF Download Problems with IIS7
Last post Jan 09, 2013 10:20 PM by brent_oly
Sep 21, 2009 02:23 PM|LINK
I've very recently migrated from a Windows 2003 Standard edition server to a Windows 2008 Server and I'm having problems with PDFs. When I try to download PDFs, in IE8 they will sometimes download successfully, sometimes partially download and not open and
sometimes not open at all. In Firefox, they just won't open. I have changed the in-built file download limit of ASP in IIS7 to 15MB from 4MB and that made no difference (my files range in size up to 12MB).
The only difference from when my files downloaded properly to now is the change in OS on the server and therefore going from IIS6 to IIS7.
The files are all appropriately FTP'd onto the server, they are not corrupted (they open perfectly fine on the server itself). I am absolutely stumped as to what the problem is - possibly an incompatibility between IIS7 and Adobe PDFs of a certain size? Am
I missing a setting in IIS7 which will solve this easily and quickly?
As a workaround I have tried to change the MIME type in IIS7 for PDFs to application/octet-stream and also tried x-application/attachment to force IE and Firefox (plus other browsers) to download the PDFs rather than try to view them in the browser, which Firefox
does perfectly but IE still insists on trying to view in the browser.
A strange fact is if you download the PDF in Firefox but 'open with Internet Explorer, IE actually opens the file perfectly whereas if you try to open the link directly in IE, it only partially downloads and then stops.
I'm really, really hoping someone can help me as I don't know what the next step is if I can't fix this and the workaround doesn't work!
Windows 2008 Server
PDF download problem
Sep 21, 2009 03:10 PM|LINK
The files are all appropriately FTP'd onto the server, they are not corrupted (they open perfectly fine on the server itself). I am absolutely stumped as to what the problem is - possibly an incompatibility between IIS7 and Adobe PDFs of a certain size?
Well is this the case......do small PDF files always open? Is there a limit where you have them.
Are these direct downloads or going through some other process (you talk about asp limits)
What is given in the IIS logs?
Sep 21, 2009 04:02 PM|LINK
Thank you for replying. I have went through some files and I range from a 493kb file which doesn't work and on the other side, I have a 5.71Mb file that does work. I have a bizarre one where 7Mb out of 7.01Mb comes down so the file doesn't actually open!
Sometimes the partially downloaded files stop about 2.5Mb downloaded and some stop at much less.
I would normally have a link on an ASP page where the link is just a normal URL where the item for downloading is a PDF but just now I am typing the PDF URL directly into the browser (I have had to hide the original page with the links whilst trying to solve
this issue!). As far as I can describe, these files shouldn't be going through any other process, they're direct requests.
I have checked the IIS logs. The files are saying status 200 even when they aren't loading fully. I'm seeing this at times:
sc-win32-status - with a value of 995.
Does this mean anything?
I have changed the ASP Response buffer limit to 15Mb but have noticed that the iis_schema.xml file still states a buffer limit of 3194304 bytes? From this, I would ascertain that IIS 7 changes aren't being propagated to the iis_schema.xml or web.config
files for the domains but then I would surely be having all files not downloading that are over the limit and some do work!
Sep 22, 2009 01:13 AM|LINK
Ummh what are the file sizes in the logs?
Are they the bytes as the actual files?
So all the files have a http status of 200. In that case IIS thinks the they have sent the last packet to the client. If there are network/proxy/firewall issues between IIS and the client machine you could see additional win32 errors (hence why the win32
column is important).
Can you eliminate an other infrastructure like network/proxy/firewall/load balancer/etc
Often you will see 64 errors indicting a network failure. The client may or may not have a completed file.
You coudl also get errors like this with code and double post bugs http://ddkonline.blogspot.com/2008/02/aspnet-double-postback-bug-strikes.html
or even refreshing repeatly could cause errors like this.
So you need to just look at the file and no code attached to it.
I have not recalled seeing the win-32 995 error before.
995: The I/O operation has been aborted because of either a thread exit or
an application request. ERROR_OPERATION_ABORTED
Is it possible to check this on the LAN where the server is? e.g.Another machine in the Internet infrastructure? As could help in narrowing down problems (network/firewall/proxy/routing/etc) to the client machine?
Is there anything in the HTTP.sys error logs? This could indict another error.
AFAIK a http 200 status indicts that IIS has sent the last packet but it does not mean that it left the machine it could be stuck/error in the TCP/IP stack or network card. Maybe try and update your network card drivers?
Maybe also dig deeper and look at the actual packets going in and out of the webserver using a network analyser tool like wireshark or netmon.
Hope that helps
Oct 12, 2009 05:46 AM|LINK
Is there any solution to this problem I have the same issue on IIS7.5 Windows 2008 R2 Web Edition.
Same code in same hosting company on different machine works fine.
Straight links to PDF's do not download correctly sometimes I get less than 10KB other times I get 200KB but never a full file.
Thought it was worth mentioning works fine in IE8 or Windows 7 but IE8 on XP no good.
Oct 12, 2009 06:30 AM|LINK
I found out that when I tested one of my 'non-downloading properly' PDFs on another service in the same local area network, it worked. The difference? One server was running Windows 2008 standard edition and the other was running Windows 2008 R2 64-bit
datacentre edition. I couldn't seem to find any solution to the problem so I took the drastic action of having my server re-built with Windows 2003 standard edition (which I'd had previously and which I know all my PDFs downloaded properly on). I found out
that the hosting company re-built my server with Windows 2003 R2 edition, not plain old standard edition as had been requested. The funny thing is on the server, using IE8, the PDFs still didn't download properly but from local machines, they downloaded just
fine (test machines used both Vista and XP).
I figured it must have been something to do with the R2 configuration but beyond that I don't know why.
Hope that helps in some small way.
Oct 12, 2009 07:26 AM|LINK
Thanks for the info, but this really doesnt help, it is clearly a problem with the IIS 7.5 webserver and I do not have the option of reverting the server to a previous version of windows.
I am looking for a solution not a workaround.
Oct 12, 2009 04:52 PM|LINK
We are investigating an issue with pdf download issue on ws08r2 caused by a change in how ws08r2 does byte-range requests - the bug seems to be in adobe acrobat plugin but it is only exposed by the new byte-range behavior of ws08r2. We are currently investigating
a workaround in ws08r2 to mask the bug in adobe acrobat.
If this issue is important to you, I would suggest opening a support case so that your business impact is factored into the severity/priority of the issue.
Oct 12, 2009 05:29 PM|LINK
That is wonderful news. I tried for 2 whole weeks to get answers on any relevant forums I could find and I kept coming up against a brick wall every time. That's why I took the drastic action of re-building my server and migrating all my websites over
again. Not the most fun time I've had but felt I was left with little choice. I know my option, although a solution, was drastic and a workaround but at the time I wasn't left with any other choice.
Glad to hear that it's now getting looked into.
Oct 12, 2009 09:19 PM|LINK
How do I go about opening a support case? I am in Australia.