The Built-in Chrome PDF Viewer does not fully load large PDF files for authenticated users.
Steps to reproduce in my environment:
WebForms
project with Individual User Accounts
authenticationsolution explorer
create some folder e.g. MyPDFs
and put inside some large pdf file.Secure this folder with web.config
:
<location path="MyPDFs">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
and for this testing purposes set runAllManagedModulesForAllRequests
to true
:
<modules runAllManagedModulesForAllRequests="true">
Run this site with IISExpress and navigate to ~/MyPDFs/A17_FlightPlan.pdf
in my case it is https://localhost:44302/pdfs/A17_FlightPlan.pdf
The login screen appears, after user successful logins the pdf is partially rendered (only first page) by built-in Chrome PDF viewer (pdfium)
When you remove authorization rule from web.config
, or you put the PDF file to some other location, it is loaded correctly
The same behavior I can reproduce on production - Full IIS
Other browsers work fine: FireFox, EDGE, or even Chrome with replaced built-in PDF viewer for Adobe Acrobat reader extension
Where could be the problem? Are the headers OK?
It was a bug in Google Chrome. In Chrome Version 81.0.4044.43 (Official Build) beta (64-bit)
it seems working.