Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
WebClient doesn't accept cookies
Old
  (#1)
HaAwK
Guest
 
Posts: n/a
Default WebClient doesn't accept cookies - 06-04-2007, 08:52 AM

here is the code, basically:

----------------------
Dim HTMLString As String
Dim WebClient As New System.Net.WebClient()
Dim querystring As New System.Collections.Specialized.NameValueCollection ()

querystring.Add("login", User)
querystring.Add("p***wd", P***)
querystring.Add(".persistent", "y")
querystring.Add(".save", "Sign In")

WebClient.QueryString = querystring

HTMLString =
System.Text.Encoding.ASCII.GetString(WebClient.Dow nloadData(https://login.bl
ah.blah.com/))

-------------------------------------

everything authenticates correctly...the website is a form with login
information...it accepts the user and p***wd correcly...but the website uses
cookies to operate...so when you login, it creates cookies on the
machine...but when i use the code above, the only thing that is returned is
an error from the website saying "cannot sign-in, cookies were rejected by
your browser"....how can I get around this?...or is there a better way in VB
..net to do what I am trying to accomplish. Thanks in advance!



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top