+ Start a Discussion

This Content Cannot Be Displayed in a Frame

Hi All,

I am trying to upload a file to box.com(an external service).

In Page1, I am having an iframe. In this iframe i am displaying another vf page-Page2.

From Page2, I am trying to connect to box.com API through OAuth. On click of a button, authorization page will be happened and I will proceed. 
The functionality is working in Page2.

But when I access Page2 from Page1(i.e. in iframe), its displaying "This Content Cannot Be Displayed in a Frame" error.

How can I prevent this?

Is this due to the X-Frame-Options header of the box.com login page?  If so, you won't be able to fix it, as all modern browsers will respect that header and refuse to display the content inside an iframe.
Hi Bob,

Thanks for your reply.

How to know this is due to X-Frame-Options..??

Could you please suggest any alternative, to avoid this error message.