1

I am trying to load a asp.net application inside php iframe. But When I am trying to view the iframe I am getting the error in asp.net not in php.

WebPage.aspx:500 Uncaught DOMException: Blocked a frame with origin "http://l503021" from accessing a cross-origin frame.

Php Code

<script>

function OpenForm()
{
    document.getElementById("ccFrame").src="http://l503021/valueonpage/WebPage.aspx";
    document.getElementById("popupDiv").style.display="block";
    document.getElementById("workingDiv").disabled=true;
}
</script>
7
  • 2
    The problem you are facing has nothing to do with PHP or ASP.Net. As the error message states it is being blocked due to cross-origin issues. Read more about that here... developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS Commented Jun 12, 2017 at 7:28
  • How I can fix this issue. Could you please helpo me in this Commented Jun 12, 2017 at 7:32
  • Do you have access to the server that hosts the page you want to open inside the iframe? Commented Jun 12, 2017 at 7:37
  • Yes I have the access to the server. The asp.net application is running in IIS and php application is running in Ubuntu(nginx) Commented Jun 12, 2017 at 7:41
  • See this question for your answer... stackoverflow.com/questions/40564439/… Commented Jun 12, 2017 at 7:49

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.