C# httpwebrequest cookies
<p>I'm using the below code to reuse the sessions.</p>

<p>Will I get the same session id on the grabUrl response cookies?</p>

<p>How do I know if both requests are using the same session/cookie?</p>

<p>Thanks.</p>

<pre><code>CookieContainer cookCon = new CookieContainer();

Httpwebrequest loginReq = (httpwebrequest) loginReq.create(loginurl);

loginReq.cookiecontainer = cookCon;

... All the response stuffs

Httpwebrequest grabReq = (httpwebrequest) grabReq.create(grabUrl);

grabUrl.cookiecontainer = cookCon
</code></pre>

<p>When I add in below code to see the container contents, it shows that there is a session id:</p>

<pre><code>        foreach (Cookie cook in cookieContainer.GetCookies(new Uri(loginurl)))
        {
            Console.WriteLine("Cookie_Get_Container:");
            Console.WriteLine("====================================================");
            Console.WriteLine("String: {0}", cook.ToString());
            Console.WriteLine("====================================================");
        }
</code></pre>

<p>So I added cookies to the login response:</p>

<pre><code>cookieContainer.Add(new Uri(domainUrl), loginRes.Cookies);
</code></pre>

<p>I am not able to get the session id when I try to get from the cookieContainer.grabRes.Cookies.
Any advise?</p>
