Monday, August 26, 2013

Trouble downloading large Adobe PDF files from a SharePoint 2013 anonymous site

I'm working on a .COM site that's built on top of SharePoint 2013 and a few hours before we were about to go live, an interesting issue was reported by the test group. Some PDF files weren't being served properly and the request for the PDF would end up in a no man's land. We narrowed down the issue to PDF files that are larger than 5 - 6 MB and wasn't sure of what was causing this in the first place. Fiddler traces revealed that a HTTP 504 was occurred every time there's a failure. After looking around I ended up on the following KB by Microsoft:

You cannot open some IIS 7.5-hosted PDF documents by using a Web browser that has the Adobe PDF Reader plug-in enabled


I thought I've found the cause and downloaded the hot fix right away and then came the next surprise. For some reason not known to me yet, the fix wouldn't install on my server. Then more research revealed that I could do a URL Rewrite on IIS to overcome the issue as stated in the article IIS 7.5 Not Serving PDF Files In IE. However,  I wasn't very comfortable doing this and that's when it hit me real hard.

What about the blob cache? Could that be causing this issue? So I reconfigured the blob cache on my farm to not cache PDF files and and voila everything started working just fine.


Even though things started working, I wasn't convinced of the fix, because what's the point of using blob cache if we cannot cache PDFs in there? So I went around digging further and read through the SharePoint Server Caches Overview published by Microsoft and I don't see even one mention of such an issue. It looks like this document was published during the SharePoint 2010 days; so I went looking for the latest version that applies to SharePoint 2013 and landed up at Plan for caching and performance in SharePoint Server 2013. But to my surprise, I didn't find anything over there as well. For now, I'm closing this post here, but will continue researching on this and will update this post if I ever manage to find something new. In the meanwhile, if any of you have found any information pertaining to this issue, please point me in the direction.