This documentation is archived and is not being maintained.

CookieContainer.MaxCookieSize Property

Represents the maximum allowed length of a Cookie.

[Visual Basic]
Public Property MaxCookieSize As Integer
public int MaxCookieSize {get; set;}
public: __property int get_MaxCookieSize();
public: __property void set_MaxCookieSize(int);
public function get MaxCookieSize() : int;
public function set MaxCookieSize(int);

Property Value

The maximum allowed length, in bytes, of a Cookie.


Exception Type Condition
ArgumentOutOfRangeException MaxCookieSize is less than or equal to zero


If the new value of MaxCookieSize is less than the current value, any Cookie with length exceeding the new value will be truncated.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

CookieContainer Class | CookieContainer Members | System.Net Namespace | Cookie | CookieCollection | CookieContainer | CookieException