I have created an ASP.net web application where I am trying to display a SharePoint Office 365 online site through iframe.

I am getting an error

XFrame cannot be set to same origin

How to display entire SharePoint site in aspx page? If This is possible, what is the approach which needs to be followed?

Please note I do not have permissions to modify SharePoint master page.

  • Did you try inserting a Page viewer Web part and showing the site?
    – Akhoy
    Aug 1, 2015 at 12:39
  • Didn't try that approach,Is there any blog or code which can explain how SharePoint online site can be displayed.I have an aspx page where SharePoint site needs to be shown and cant modify anything in sharepoint site(PageViewer webpart seems to be related to SharePoint,not very sure about this) Aug 1, 2015 at 16:53

1 Answer 1


I presume your ASPX page and Office365 are different (sub)domains

Cross-domain iframe requests to SharePoint Online organizations are blocked.



  • Please can i know if there is any other approach for achieving this as it cannot be done through iframe,i have been stuck with this task for some time now.It would be a great help if i could get any approach(code) for displaying SharePoint site Aug 1, 2015 at 11:16
  • You have been given a mission impossible if you are not allowed to change Server Side settings. Aug 1, 2015 at 12:00
  • You mean it can only be done by setting <WebPartPages:AllowFraming runat="server" /> in Masterpage. Aug 1, 2015 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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