SharePoint IFRAME error "This content cannot be displayed in a framework" <continued>

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.