Results 1 to 9 of 9

Thread: Webbrowser Access Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    3

    Webbrowser Access Problem

    G'day all

    I'm trying to use the webbrowser control to traverse a website and fill in some forms automatically.


    the page displays properly in the WB control on screen and you can right click and view source for each frame

    The majority of frames are handled fine,
    however trying to access one particular frame (the most important one of course!) generates an "Access Denied" error
    (80070005).

    I can't get any infomation out of it or enter any information into it.

    Does any one have any ideas why this might be happening, and/or know how to get around it?

    any and all suggestions appreciated.

  2. #2
    Fanatic Member alexandros's Avatar
    Join Date
    Oct 2002
    Location
    Milky Way Galaxy
    Posts
    694
    are you sure you are using the correct index if you are using a collection ?
    for example if you want to get item 0 but it does not exist because the collection starts counting with 1.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Posts
    3
    Thanks,
    but unfortunatley I am sure

    looping through all the frames the first three will work
    the forth will fail with this error the fifth and onwards will work

    It's very strange. I suspect they are protecting it in some way
    but cant see anything different with the way the that particular frame is coded



    -Shade

  4. #4
    Hyperactive Member
    Join Date
    Dec 1999
    Posts
    321

    Re: Webbrowser Access Problem

    Has anyone found a solution to this problem yet? I've been searching for DAYS and WEEKS for a solution, but it doesn't seem to be found.

    I specifically tried the example given by MICROSOFT themselfes in
    http://support.microsoft.com/default...;EN-US;Q297950
    but it will STILL GIVE ME an "Access Denied" error...

    does anyone know how to access frame contents? (Obviously parsing the frameset then navigating to that fram manually is not an option)
    Signed, Rodik (rodik@hehe.com)
    Programmer,usesVB6ED
    ===========================
    Copyright©RodikCo,2002.

    Dont mind this signature ;] Its old

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Webbrowser Access Problem

    Can you post the site? Have you tried using DOM to parse? There have been a lot of examples. You may want to send a PM to TheVader, with a link to this thread. He has helped many people with parsing with DOM. I have posted a few examples also, but have to know if you are using an ASP or Java page.

  6. #6
    Hyperactive Member
    Join Date
    Dec 1999
    Posts
    321

    Re: Webbrowser Access Problem

    I Also want to be able to manipulate frame content (as described in http://www.openicon.com/FramesHowTo.html ) but VB wont let me!! Or rather.. the WebBrowser control wont let me.

    Have you tried the example by microsoft (in my previous post) ? It didn't work with an "Access Denied" error. Maybe it's just my computer? I dunno..

    It's not a specific site, just any site at all containing frames..
    Signed, Rodik (rodik@hehe.com)
    Programmer,usesVB6ED
    ===========================
    Copyright©RodikCo,2002.

    Dont mind this signature ;] Its old

  7. #7
    Hyperactive Member
    Join Date
    Dec 1999
    Posts
    321

    Re: Webbrowser Access Problem

    -bump -
    Signed, Rodik (rodik@hehe.com)
    Programmer,usesVB6ED
    ===========================
    Copyright©RodikCo,2002.

    Dont mind this signature ;] Its old

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Webbrowser Access Problem

    Don't post your email address in the forums, or at least separate it with an AT instead of a @. You will get spammed as bots search the pages.

    I've PM'd theVader for you. Hopefully VBMail is working.

  9. #9
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871

    Re: Webbrowser Access Problem

    Well, the example posted by Microsoft doesn't do much, except for some in-site element parsing. How have you managed to access the other frames? Do you know how to use the frames collection?

    Anyway, I'm using this sub to fill a collection with all frame documents:
    VB Code:
    1. Private Sub GetFrames()
    2. 'Purpose: searches all frames in the document(s) and adds them to colDocuments
    3.  
    4. Dim i As Integer, j As Integer
    5. j = 1
    6.  
    7. Set colDocuments = New Collection
    8. colDocuments.Add webPage.Document
    9.  
    10. Do While j < colDocuments.Count + 1
    11.     For i = 0 To colDocuments.Item(j).frames.Length - 1
    12.         colDocuments.Add colDocuments.Item(j).frames.Item(i).Document
    13.     Next i
    14.     j = j + 1
    15. Loop
    16. End Sub
    colDocuments can then be used as any other HTMLDocument (such as WebBrowser1.Document). I've used this code in an application that browses many sites with frames, and I've never got an 'Access Denied' error.

    Can you post some of your code?
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width