Refer -
HttpWebRequest.CookieContainer
Property[
^].
Quote:
CookieContainer is null by default. You must assign a CookieContainer object to the property to have cookies returned in the Cookies property of the HttpWebResponse returned by the GetResponse method.
Response.Cookies = Request.CookieContainer.GetCookies(Request.RequestUri);
So, the underlined code would return you
null
always.
You should use
Response.Cookies
to see all the cookies. In that link, check how it is reading the cookies from
response
, not
request
.