Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Access frames on different domain from Frameset

Access frames on different domain from Frameset

Scheduled Pinned Locked Moved ASP.NET
helpalgorithmsquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hemant_ec48
    wrote on last edited by
    #1

    One page containg two frame....with help of SHDocVw.InternetExplorer object i have to excess second frame. Problem is that when try to loop through below code Dim HTMLDoc As mshtml.HTMLDocument HTMLDoc = oIE.Document For i As Integer = 0 To HTMLDoc.frames.length - 1 Dim f1 As mshtml.IHTMLWindow2 = CType(HTMLDoc.frames.item(i), mshtml.IHTMLWindow2) MessageBox.Show(f1.document.body.innerHTML) Next while access through second one it gives me that "Access is denied." after searching i come to know that this is happen dur to cross page scripting of frame.... here i have see that second frame point to different domain. is there any solution for this problem....??? thank you.

    L 1 Reply Last reply
    0
    • H Hemant_ec48

      One page containg two frame....with help of SHDocVw.InternetExplorer object i have to excess second frame. Problem is that when try to loop through below code Dim HTMLDoc As mshtml.HTMLDocument HTMLDoc = oIE.Document For i As Integer = 0 To HTMLDoc.frames.length - 1 Dim f1 As mshtml.IHTMLWindow2 = CType(HTMLDoc.frames.item(i), mshtml.IHTMLWindow2) MessageBox.Show(f1.document.body.innerHTML) Next while access through second one it gives me that "Access is denied." after searching i come to know that this is happen dur to cross page scripting of frame.... here i have see that second frame point to different domain. is there any solution for this problem....??? thank you.

      L Offline
      L Offline
      Leonardo Muzzi
      wrote on last edited by
      #2

      No. For security reasons, scripts cannot access other domains. You can try doing a similar code on the server side, that is, the .net (and not the browser script) would query the page and read the HTML for you. This can be achieved throught the System.Net.WebRequest class. After gathering all the HTML, you can just write it in a file or something.

      Regards, Leonardo Muzzi

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups