Ok i have this code to download some data
Private Sub Getfiles_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Getfiles.Click
Webbrowser.Navigate(New System.Uri("http://mail.google.com/mail/feed/atom"))
Dim Net As New System.Net.WebClient
AtomFeed = System.Text.Encoding.ASCII.GetString(Net.DownloadData("http://mail.google.com/mail/feed/atom"))
Atomfeedtext.Text = AtomFeed
End Sub
Every Time i run it i get a 401 Unauthorised Error
I believe this because the web browser has logged in but the net has not, so can i make the net interact with the web browser to give me the authorisation or should i make it log on to both
Heres my Web Browser login script
Dim Document As Object
If Login.Text = "Login" Then
On Error Resume Next
Document = Webbrowser.Document.DomDocument
Document.Forms(0).email.Value = User.Text
Document.Forms(0).passwd.Value = Pass.Text
Document.Forms(0).submit()
Login.Text = "Logout"
Getfiles.Enabled = True
Else
Webbrowser.Navigate(New System.Uri("http://mail.google.com/mail/?logout&hl=en"))
Login.Text = "Login"
Getfiles.Enabled = False
End If
oh and heres the atomfeed Dim if you want it
Dim AtomFeed As Object
Thanks for your help