In the previous SharePoint site IFRAME reference, we encountered the following problems: SharePoint sites with other systems or inaccessible environments, when the SharePoint page is referenced, an error "This content cannot be displayed in a framework" is reported. We have previously adopted a solution.
Today, I accidentally looked at msdn and found a simpler way to share it with you.
Principles
In most cases, if the webpage sends an X-frame-options HTTP header in the response, the webpage cannot be displayed in the framework. By default, A SharePoint webpage contains the X-frame-Options Header. If you use the SharePoint web page hosted by the Application Web, you may encounter the following error (as shown in): "This content cannot be displayed in the framework ".
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.What you can try:Open this content in a new window
Remember that when a webpage is displayed in the frame, a specific scheme is vulnerable to "clickjacking" attacks. Evaluate your application part solution carefully to ensure there is no risk of clickjacking attacks.
If the page hosted on the Application Web is not vulnerable to clickjacking attacks, you can use the allowframing Web part to suppress the X-frame-Options Header in the page response. The following code example shows how to use the allowframing Web part on a Sharepoint page.
<webpartpages:allowframing id="AllowFraming1" runat="server"/>
Solution
Use SharePoint designer to open the page layout (specifically, modify the page to be referenced by the IFRAME method) and add the following code:
Specifically, webpartid is automatically generated and does not need to be manually added;
Open the page again and find that the IFRAME page is normal and no error is reported, for example:
Reference
Http://www.cnblogs.com/jianyus/p/3385514.html
Http://msdn.microsoft.com/ZH-CN/library/office/fp179921 (V = Office.15). aspx