Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to embed my sharepoint 2013 pages in another document, but the X-FRAME-OPTIONS are set to SAMEORIGIN by default.

Adding ALLOW-FROM url does not work when added to the web.config OR on specific pages as <meta http-equiv="X-Frame-Options" content="allow" /> or <meta http-equiv="X-Frame-Options" content="ALLOW-FROM http://voyager/voyager" /> or <WebPartPages:AllowFraming runat="server" />.

What are my options here? I would like to globally allow my sharepoint content to be used in an iframe.

share|improve this question

2 Answers 2

You might try Permissive XFrame Header, which is basically an HttpModule that can be enabled per Web Application.

share|improve this answer
    
This is the correct solution. –  tbone Aug 8 at 21:32
    
Thanks. Yes, this article fails to address framing-in PDF's for-example (that don't use a Master page) and hence the need for this HTTP Module that strips-out the annoying meta tag. Maybe the fundamental question is what puts it there? –  PeterX 2 days ago

You can try putting the meta-tag in master page. I had the same issue with SP2010 and it worked there.

Or else you can try changing the X-Frame options tag from IIS manager. Here are the steps tpo do so:

•Go to Inetmgr -> Select the Web application ->Select and double click the HttpResponseHeaders for the application

•Select Add at the right hand side and give the values accordingly, for your case

Name: X-Frame-Options

Value: ALLOW

share|improve this answer
    
Thanks for your post i use sp2013, tried your solution but still did not work it seems that sharepoint still override it. looking at fiddler I get these headers X-Content-Type-Options: nosniff X-FRAME-OPTIONS: ALLOW X-FRAME-OPTIONS: ALLOW X-FRAME-OPTIONS: SAMEORIGIN in order it seems the last one alway wins any other solution can you suggest –  Moes Jul 19 '13 at 2:35
    
As per my comment above, you can put this new control in the Master Page <WebPartPages:AllowFraming runat="server" /> but it won't work when you frame-in a PDF (for example) as it's not using a Master Page. So the solution above with a HTTP Module seems to be required. –  PeterX 2 days ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.