-
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 :)
-
Re: WebBrowser Security
Do you have a blank exception handler surrounding that call to Add()?
-
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.
-
Re: WebBrowser Security
"Doesn't hit any of it"? Does the program hang on that statement or just skip to End Sub?
-
Re: WebBrowser Security
It just skips to the End Sub.
-
Re: WebBrowser Security
I still think this has something to do with an exception, but I could be completely wrong.
-
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?