Hopefully this won't be too painful...
I am trying to access a website from a webbrowser control, I have tried two methods (well actually, lots more from googling with mixed results) that have the following problems:
URL = "http://username:password@thewebsite.com"
WebBrowser1.Navigate(URL)
1: This method results in a window security pop up, asking me to log in to the company proxy. I guess this is because I am using the username/password for the website and the URL navigation is attempting to input it to the proxy?
If I attempt to automate/avoid the proxy bit by doing this:
Dim Headers As String = "Proxy-Authorization: Basic " & Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes("USERNAME:PASSWORD"))
WebBrowser1.Navigate(URL, "", Encoding.Unicode.GetBytes(String.Empty), Headers)
I still meet with failure as the proxy log in box pops up regardless.
2: If I go straight to the website without editing the URL:
URL = "http://thewebsite.com"
WebBrowser1.Navigate(URL)
Then it takes me to teh website without any proxy messages at all (great!) but the website then pops up a log in box that I need to populate. Sadly I cannot get hold of any elementids for this (to automate) as it is a windows form pop up outside of the webbrowser control, and I cannot seem to interrogate it or figure out how to input into it.
Does anyone have any ideas for what I should try next? Is there some way to get the login form from method 2 to either populate itself or at least let me view the source of that page? I cannot click away from it until it is populated correctly.
I just cannot seem to get anything to work that will deal with both log in forms for me, it is either one or the other. (both forms look like windows standard log in prompts, they are not built into the webpage). Thanks