Provides a container for a collection of CookieCollection objects.
Assembly: System (in System.dll)
A is a data structure that provides storage for instances of the Cookie class, and which is accessed in a database-like manner. The has a capacity limit that is set when the container is created or changed by a property.
An instance of the Cookie class is added to the container based on its originating URI. It is added to an internal CookieCollection associated with the URI. A Cookie is retrieved from the container based on the URI as a CookieCollection, or as a string that can be used to submit HTTP WebRequests.
The has three properties that govern the volume of the content of the container: Capacity, MaxCookieSize, and PerDomainCapacity. These values have the default settings of 300, 4096, and 20 respectively. When a Cookie is added to the container, these properties are used to determine whether a Cookie already contained in the should be discarded to make room for the new one. The keeps track of each addition to ensure that neither the Capacity nor the PerDomainCapacity limits are exceeded. If one or both are exceeded, then Cookie instances held by the are removed. First, any expired Cookie is removed. If further capacity must be recaptured, then the least-recently used CookieCollection is purged.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.