1
I am trying to load Viewer in iframe in Angular.
Question asked by Normal Paul - 8/7/2024 at 8:06 AM
Answered
I am trying to load Viewer in iframe in Angular. 
I have hosted https://docviewer.somesite.com.I am facing following issues. I am using latest Version of DocumentUltimate 7.0.10. I have shared screenshot for your understand.

3 Replies

Reply to Thread
0
Cem Alacayir Replied
Employee Post
This error from your screenshot explains:

Blocked a frame of origin "null" from accessing a cross-origin frame
Possible reason:

This happens because Chrome doesn't allow frames from your hard disk to access each others' content. Which, technically we term as Cross-origin request.

Solution of the above problem is:

1. Either you host your webpage on a local web server.

2. Use any other browser like Firefox to test locallty
0
Cem Alacayir Replied
Employee Post
FYI, opening html file locally throws an other error, we fixed it and it will be released soon.

However your error is different;

Do you have an upper-most iframe which may be have sandbox attribute which means it's a sandboxed iframe?

If so, ensure that upper-most iframe, has these permissions in the sandbox attribute:

<iframe 
  src="http://domain/test-remote.html"
  style="width: 800px; height: 600px" 
  sandbox="allow-scripts allow-same-origin"></iframe>

Other than that I don't how you managed to get the error because DocumentViewer and it's own generated iframe should already be in the same domain because ASP.NET renders the component. Did you try to load index.html of the viewer in an iframe yourself?
0
Cem Alacayir Replied
Employee Post Marked As Answer

Reply to Thread