i am using IFrame in order to load the URL.
when i try to load the other URL inside iframe and it shows "Access denied " message.
how to handle this issue.
need ur suggestion with example.
regards
gopal.s
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Raj BandiRank #1,603 · 981 reputationPosted Apr 28, 2013, 9:22 PM EDT
What url you are trying to access? are you trying to access iframe content from main page with javascript. If yes, it must be cross domain policy restriction.
Iframe url domain, protocol and port must be same as your main page domain, protocol and port. You cannot access content from different domain/port in iframe. Its a cross domain policy restriction.
Examples
----------------
Main page url : http://www.abc.com/test/page.html
Ifram url : http://www.abc.com/page1.html
Works: Yes
Mainpage url and iframe url domains, port, protocol are same.
---------------------------------------------------------------
Main Page url: http://www.abc.com/test/page.html
iframe Url : http://www.xyz.com/page1.html
Works: No
MainPage url and iframe url domains are different
------------------------------------------------
Main Page url: http://www.abc.com/test/page.html
iframe Url : http://www.abc.com:8080/page1.html
Works: No
MainPage url and iframe url ports are different
------------------------------------------------
Main Page url: http://www.abc.com/test/page.html
iframe Url : https://www.abc.com/page1.html
Works: No
MainPage url and iframe url protocols are different (iframe with https)
Hope this helps.
Cheers,
Raj
gopal kannan55 reputationPosted Apr 28, 2013, 9:50 PM EDT
thanks for ur reply.
i need to load other server url in an iframe.
is it possible to achieve this using URL Rewrite.
need ur suggestions..
regards
gopal.s
Raj BandiRank #1,603 · 981 reputationPosted Apr 29, 2013, 12:46 AM EDT
Yes partially. URL rewrite cannot make requests on its own, Its just watch for incoming requests to your server and rewrites url format with configured parameters. It doesn't fetch external url content. So you need a reverse proxy to do that.
I'm in the middle of my article how to achieve cross domain communication in an iframe, I'll update in few days,
Kind Regards,
Raj
gopal kannan55 reputationPosted Apr 29, 2013, 7:22 PM EDT
i am waiting to see your article..
regards
gopal.s
Raj BandiRank #1,603 · 981 reputationPosted May 4, 2013, 8:19 PM EDT