« Previous Next »

Thread: PDF Download Problems with IIS7

Last post 12-05-2009 8:01 AM by ma_khan. 124 replies.

Average Rating Rate It (5)

RSS

Page 1 of 9 (125 items) 1 2 3 4 5 Next > ... Last »

Sort Posts:

  • 09-21-2009, 10:23 AM

    • aremac
    • Not Ranked
    • Joined on 09-21-2009, 2:18 PM
    • Posts 6

    PDF Download Problems with IIS7

    Hi,

    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!

    Kind regards,

    Aremac

  • 09-21-2009, 11:10 AM In reply to

    Re: PDF Download Problems with IIS7

    aremac:

    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?

  • 09-21-2009, 12:02 PM In reply to

    • aremac
    • Not Ranked
    • Joined on 09-21-2009, 2:18 PM
    • Posts 6

    Re: PDF Download Problems with IIS7

    Hi Rovastar,

    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! 

    Cheers,

    Aremac

  • 09-21-2009, 9:13 PM In reply to

    Re: PDF Download Problems with IIS7

    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

  • 10-12-2009, 1:46 AM In reply to

    • rusware
    • Not Ranked
    • Joined on 10-12-2009, 5:44 AM
    • Posts 7

    Re: PDF Download Problems with IIS7

    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.

  • 10-12-2009, 2:30 AM In reply to

    • aremac
    • Not Ranked
    • Joined on 09-21-2009, 2:18 PM
    • Posts 6

    Re: PDF Download Problems with IIS7

     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.

    Kind regards,

    Heather

  • 10-12-2009, 3:26 AM In reply to

    • rusware
    • Not Ranked
    • Joined on 10-12-2009, 5:44 AM
    • Posts 7

    Re: PDF Download Problems with IIS7

    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.

  • 10-12-2009, 12:52 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: PDF Download Problems with IIS7

    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.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 10-12-2009, 1:29 PM In reply to

    • aremac
    • Not Ranked
    • Joined on 09-21-2009, 2:18 PM
    • Posts 6

    Re: PDF Download Problems with IIS7

     Hi,

    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.

    Kind regards,

    Heather (Aremac)

  • 10-12-2009, 5:19 PM In reply to

    • rusware
    • Not Ranked
    • Joined on 10-12-2009, 5:44 AM
    • Posts 7

    Re: PDF Download Problems with IIS7

    How do I go about opening a support case? I am in Australia.

  • 10-12-2009, 5:39 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: PDF Download Problems with IIS7

    http://support.microsoft.com should have the information.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 10-12-2009, 6:01 PM In reply to

    • rusware
    • Not Ranked
    • Joined on 10-12-2009, 5:44 AM
    • Posts 7

    Re: PDF Download Problems with IIS7

    Anil

    Unfortunately Microsoft support want me to pay over $300 in order to identify and log this as a problem.  I am not willing to pay this when essentialy this is not my problem. 

    I guess I will just have to wait for a solution,  I would appreciate if you could reply to this post when and if a solution is ever found.

    I suppose in future I should take my time upgrading to new versions of server software until all the bug are ironed out.  I am very suprised this problem is not being treated as a HIGH priority by MS as almost every site on the web has a least a few PDF documents on them.

  • 10-16-2009, 10:57 AM In reply to

    Re: PDF Download Problems with IIS7

    We have just ran into the same problem as well, and it is very disappointing to find out that there is not a fix available yet.  Our temporary workaround was to place the PDF documents on another server that we have that is still running Server 2003.

    We will likely be opening a support incident next week with MS, once our admin has enough time to get on the phone with them.

  • 10-16-2009, 2:47 PM In reply to

    • t.a.King
    • Not Ranked
    • Joined on 10-14-2009, 9:31 PM
    • Posts 4

    Re: PDF Download Problems with IIS7

    I did open a support incident on this.  On 10/15/2009 the technician working my case said he contacted Anil Ruia, the member of the IIS Core Team who posted earlier in this thread, and was told they are still looking for a workaround, but at that point, it was looking like what was needed was a patch from Adobe.

    I asked him if anyone had let Adobe know this.  His reply: "I had also contacted the escalation engineer from my team who was working with the product team on this issue through another case and he did contact Adobe last week. Their North America offices are closed this week so he expects they will start working on a fix beginning of next week." 

    We moved our 2008 r2 Web server into production on 10/9.  Didn't catch this since 90% of our PDFs are under 1MB, and those seem to be working fine in IE.  Missed the Firefox thing totally and can't think of a good excuse for it, beside being totally focused on figuring out IIS 7.

    Otherwise, I'm really happy with 2008 r2.  Been running it on the home server for a few months, and am running it as my desktop dev environ and am very happy with it.  This is just very unfortunate.

    Next week I'm going to work on finding my own workaround; I was dragging my heals this week, hoping for a patch.  I may fire up the 2003 server and serve the PDFs from there, or write an ASP.Net page that will read the PDF into a stream and feed it directly to the client, bypassing the IIS handler.  Might jigger with IIS setup on our test machine, but it doesn't sound like configuration changes will help.

    I'll post any new information I get here.  Hang in there everyone!  Indicators seem to suggest help is on the way.

  • 10-16-2009, 2:58 PM In reply to

    Re: PDF Download Problems with IIS7

    Thank you for the update!

    We are considering the exact same workaround that you have mentioned.  I was looking at the possibility of streaming PDFs directly through an HttpHandler, regardless of if it was linearized or not.  Glad to see that I am not alone in thinking that is a viable short-term approach.

Page 1 of 9 (125 items) 1 2 3 4 5 Next > ... Last »
Microsoft Communities