Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use WebBrowser to browser login website.
I login this website but I don't get Cookie (ASP.NET_SessionId).

Can you help me?

I use Win7 Ultimate x64, IE9, VS 2010 Ultimate.
Posted
Updated 12-Apr-11 21:41pm
v3
Comments
Dalek Dave 13-Apr-11 3:42am    
Edited to remove the multifarious question marks and for other grammar.
OriginalGriff 13-Apr-11 3:50am    
How are you trying to get and set the cookie? We need to see the relevant code fragments.

1 solution

web_cookies = new CookieContainer();
// Create a 'WebRequest' object with the specified url.
HttpWebRequest myWebRequest = (HttpWebRequest)WebRequest.Create(url);

myWebRequest.CookieContainer = web_cookies;
 
Share this answer
 
Comments
Nguyen Tuan 13-Apr-11 4:06am    
I think this is not a solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900