How I Fixed "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=14.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"
add assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, 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 http-equiv="X-UA-Compatible" content="IE=edge"
for Compatibility for IE 11 and Edge in the aspx page.
Also Posted On My Personal Website : https://www.codingdefined.com/2018/08/how-to-fix-this-content-cannot-be.html