a blog for those who code

Monday 13 August 2018

How to Fix this content cannot be displayed in a frame in SSRS 2017

I was getting the error "IFrame: This content cannot be displayed in a frame, To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame." when I tried to Upgrade my ASP.NET application to point to SSRS 2017 instead of SSRS 2012 or 2016.

The things which I have worked on fixing "This content cannot be displayed in a frame" are as follows :

1. I was using ReportViewer to show the SSRS Report in ASP.NET, which I have updated from older Version to the newer version i.e. Version 14. Now my web.config file has below code

<add assembly="Microsoft.ReportViewer.Common, Version=, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>

To Update, first remove the older dependencies from your project and then Install the newer version from the Nuget Package Manager Console Install-Package Microsoft.ReportingServices.ReportViewerControl.WinForms

2. I also added '&rs:embed=true' in the Report URL for all the reports

3. Last thing I have added <meta http-equiv="X-UA-Compatible" content="IE=edge" /> for Compatibility for IE 11 and Edge in the aspx page.

Please let me know if these also worked for you. Please like and share the CodingDefined.com blog if you find it useful and helpful.

No comments:

Post a Comment