Refused to display ‘http://localhost:12345/api/reports/clients/clientId/instances/instanceId/documents/documentId?response-content-disposition=inline’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.
Environment
Product | Progress® Telerik® Reporting |
Project Type | Web Application |
Report Viewer | Web-based Viewers |
Error Message
Refused to display ‘http://localhost:12345/api/reports/clients/clientId/instances/instanceId/documents/documentId?response-content-disposition=inline’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.
Cause\Possible Cause(s)
The error indicates that either the application has set an X-Frame-Options header to SAMEORIGIN or Chrome browser did. This means that the application has disallowed loading of the resource in an iframe outside of its domain. For more information see The X-Frame-Options response header on MDN.
Solution
There are two possible approaches that might fix the issue:
Change the X-Frame-Option to ALLOW FROM <address>;
Change the HTML5 Viewer's printMode option to download the PDF file with the additional settings (telerikReportViewer.PrintModes.FORCE_PDF_FILE) - Printing Reports.