2

I have a WebBrowser control in C# and now I need to get internet_cookie_httponly mean that ASP.NET_SessionId over webcontrol. But I'm using IE6 so that I can not use wininet.dll for this. I have tried something same that:

var cookie = webBrowser1.Document.Cookie;

but it can not response ASP.NET_SessionId. Please show me how can I get ASP.NET_SessionId over WebBrowser, thank you!

  • Why are you trying to get cookies from WebBrowser? The cookies are stored in the user account settings and are common between all applications including IE and WebBrowser. See : https://stackoverflow.com/questions/12373738/how-do-i-set-a-cookie-on-httpclients-httprequestmessage – jdweng Jun 16 '17 at 02:53
  • i'm building a web control for login a web page (asp), after that, I will get ASP.NET_SessionId and use RestSharp for GET/POST. need ASP.NET_SessionId for authentication –  Jun 16 '17 at 03:04
  • The webbrowser would of stored the cookies in the user account settings so you can still get it from the user account and not from the webbrowser. – jdweng Jun 16 '17 at 03:21
  • sorry nut i dont understand your mean?! –  Jun 16 '17 at 03:27

0 Answers0