I've created this sample using MSDN examples.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(redirUri);
request.Method = "GET";
request.CookieContainer = new CookieContainer();
Trace.WriteLine("Created request to " + redirUri);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
// Right here I want to get JSESSIONID, but Cookies are empty
foreach (Cookie cook in response.Cookies)
{
Debug.WriteLine("{0} = {1}", cook.Name, cook.Value);
}
Cannot get JSESSIONID. I need to make several GET/POST queries in one session, that's why I need JSESSIONID. Help me please.