This problem I had for some time, maybe few months. Using CookieContainer sometimes doesn't work for me. For example, when I try to automatically log into some site which has authToken or something similar in their POST/GET request, it's always failing. So what I am asking today is, is there actually a better solution or replacement for CookieContainer?
Have a nice day,
Bozzy.
2 Replies - 530 Views - Last Post: 16 January 2013 - 11:20 PM
#1
CookieContainer - Replacement or better solution?
Posted 16 January 2013 - 03:02 AM
Replies To: CookieContainer - Replacement or better solution?
#2
Re: CookieContainer - Replacement or better solution?
Posted 16 January 2013 - 05:49 AM
Do you know the reason for the failure? Are you sure it is because of the CookieContainer?
#3
Re: CookieContainer - Replacement or better solution?
Posted 16 January 2013 - 11:20 PM
Well what would be else? I am doing something like this:
And after that do the POST request with the AUTH TOKEN I got from the GET request using CC as CookieContainer too.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); req.Method="GET"; req.CookieContainer=cc; HttpWebResponse... ... Match m = Regex.Match(find the auth token)
And after that do the POST request with the AUTH TOKEN I got from the GET request using CC as CookieContainer too.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|