System.Net.HttpWebRequest.CookieContainer Property

Gets or sets the cookies associated with the request.


public virtual CookieContainer CookieContainer { get; set; }


Documentation for this section has not yet been entered.


The HttpWebRequest.CookieContainer property provides an instance of the System.Net.CookieContainer class that contains the cookies associated with this request.

HttpWebRequest.CookieContainer is null by default. You must assign a System.Net.CookieContainer object to the property to have cookies returned in the HttpWebResponse.Cookies property of the System.Net.HttpWebResponse returned by the HttpWebRequest.GetResponse method.


For security reasons, cookies are disabled by default. If you want to use cookies, use the HttpWebRequest.CookieContainer property to enable cookies.


Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0,,