ChunkedCookieHandler Constructor (Int32)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the ChunkedCookieHandler class that uses a specified chunk size.

Namespace:   System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public ChunkedCookieHandler(
	int chunkSize
)

Parameters

chunkSize
Type: System.Int32

The chunk size that will be used to write cookies.

Exception Condition
ArgumentOutOfRangeException

chunkSize' is less than the minimum chunk size of 1000 (MinimumChunkSize).

You must be careful when adjusting the chunk size. Web browsers have different limits on the size of cookies and the number of cookies that are allowed in total and per domain. For example, the original Netscape specification specified these limits: 300 cookies total, 4096 bytes per cookie header (including metadata, not just the cookie value), and 20 cookies per domain.

.NET Framework
Available since 4.5
Return to top
Show: