Results 1 to 7 of 7

Thread: WebBrowser Security

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Location
    Altus, AR
    Posts
    4

    WebBrowser Security

    I've tried looking this up on google, and didn't find anything, or missed it, but I was wondering what the security was like for the WebBrowser Class. Does it inherit the security settings for IE, or do I need to figure out how to add some in myself?


    On the same note, in this web browser I am making, I decided I would store the History in a Settings file. Now, I made a field as a System.Collection.Specialized.StringCollection, but when I go to add a string to the collection, it doesn't work. I stepped through the code, and what seems to be happening is it hits the
    Settings.Default.History.Add(stringvariablehere), then skips all code below that, no matter what it is. Thanks for help

  2. #2
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    Re: WebBrowser Security

    Do you have a blank exception handler surrounding that call to Add()?
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Location
    Altus, AR
    Posts
    4

    Re: WebBrowser Security

    Do you mean a Try/Catch? If so, then no, I don't, here's what I have.


    Private Sub WebBrowser_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles WebBrowser.Navigated
    Dim newAddress As String
    If Me.WebBrowser.Url.IsFile Then
    newAddress = Me.WebBrowser.Url.LocalPath
    Else
    newAddress = Me.WebBrowser.Url.ToString
    End If

    Me.txtAddress.Text = newAddress
    currentURL = newAddress
    Me.txtStatus.Text = "Done."

    Settings.Default.History.Add(currentURL)
    Settings.Default.Save()
    End Sub


    No matter what I put after the Settings.Default.History.Add(currentURL) it doesn't hit any of it, but it doesn't throw any exceptions.

  4. #4
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    Re: WebBrowser Security

    "Doesn't hit any of it"? Does the program hang on that statement or just skip to End Sub?
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Location
    Altus, AR
    Posts
    4

    Re: WebBrowser Security

    It just skips to the End Sub.

  6. #6
    Fanatic Member
    Join Date
    May 2001
    Posts
    837

    Re: WebBrowser Security

    I still think this has something to do with an exception, but I could be completely wrong.
    The human brain cannot hold all of the knowledge that exists in this world, but it can hold pointers to that knowledge.

  7. #7

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Location
    Altus, AR
    Posts
    4

    Re: WebBrowser Security

    Well, there are other routes to the same end if I can't figure it out. But, back to my first question, does anybody know anything about if the WebBrowser Control inherits whatever security settings IE currently has, or how does that work?

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