AndrewVos

Hi, I am attempting to make a webbrowser control automatically login to this site: http://userstats.adsl.saix.net/ instead of showing a browser login dialog.

Anyone got any ideas

I did get it working like this:

Dim htmlText As String

Dim url As String = "http://userstats.adsl.saix.net/"

Dim webRequest As Net.WebRequest = Net.HttpWebRequest.Create(url)

Dim httpWebRequest As Net.HttpWebRequest = CType(webRequest, Net.HttpWebRequest)

httpWebRequest.Credentials = New Net.NetworkCredential(userName, password)

httpWebRequest.PreAuthenticate = True

Dim webResponse As Net.WebResponse = httpWebRequest.GetResponse

Dim httpWebResponse As Net.HttpWebResponse = CType(webResponse, Net.HttpWebResponse)

Dim streamReader As New IO.StreamReader(httpWebResponse.GetResponseStream)

htmlText = streamReader.ReadToEnd




Re: .NET Base Class Library WebBrowser Auto Login?

AndrewVos

Hi.

Got it working properly using this URI format :

http://USERNAME:PASSWORD@userstats.adsl.saix.net

Thanks anyway :>






Re: .NET Base Class Library WebBrowser Auto Login?

Krabat

>Got it working properly using this URI format :

>http://USERNAMEStick out tongueASSWORD@userstats.adsl.saix.net

>Thanks anyway :>

What about https auto login