HttpWebResponse POST Request not returning all the cookies

DeusOmnis

New member
Joined
Jan 1, 2004
Messages
2
Im trying to send a POST to a website and I need the cookies its suppose to return, however, its not returning all the cookies I need. If I do it with my browser I get seven cookies, if I do it with the ASP.NET post I get 2. Ive read the headers to make sure .NET just isnt taking all of the cookies out, and theres definately not more than 2. Ive tried searching everywhere on the net for similar issues and Im all run out of ideas for what to try next. Has anyone any ideas?
 
I solved my problem, but I have another question too. I figured out that there was an auto redirect from the page I posted to to another page. By disallowing the redirect using the HttpWebRequest.AllowAutoRedirect property I was able to grab the cookies that I needed. However, does anyone know how to grab the cookies both from before teh redirect and after? Or is there not a way?
 
Did you try creating two separate cookie containers and then switching them before the redirect takes place?
 
Back
Top