0

I have a SharePoint provider hosted app built using MVC 5 and the UI is SPA using Durandal framework.

We need to have a feature that allow the end user to upload documents, and later to preview and edit it inside the browser, but we don't want the user to leave the application and open another tab or browser window, the edit should be in the same window in a lightbox or something similar.

I tried to put it in an iframee but i got an error message: Refused to display 'SERVER_URL/EditDocumentInOWA/_layo…{97f93792-f19f-4db9-a7ec-0701914c269b}&action=editnew&IsDlg=1&output=embed' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

Any ideas if this is even possible ?

1 Answer 1

0

It is possible by changing the X-Frame-Options. But all the descriptions I've found until now only describe how to remove it, which opens you up to clickjacking. If you don't mind that then you can create a HttpModule or download it from Permissive XFrame Header and then enable it for OWA like in Putting Office Web Apps in an iFrame

3
  • Thanks Per Removing the X-Frame-Options using an Http Module won't be a good fit for us as we want the App to be ready anytime to be deployed on Office 365, I don't belive it will be possible to install assemblies into the GAC. Commented Apr 27, 2014 at 14:57
  • Also, the WebPartPages:AllowFraming tag should be on the page that i want to add as a source for the IFrame which in this case i don't have an access to it(The WopiFrame.aspx page) Commented Apr 27, 2014 at 15:05
  • With Office365 you have no way of doing this. WebPartPages:AllowFraming can only be used to allow SharePoint pages to be IFramed for Office Web Apps on-premises you can use the HttpModule I link to Commented Apr 27, 2014 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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