<chunkedCookieHandler>

Configures the ChunkedCookieHandler. This element may only be present if the mode attribute of the <cookieHandler> element is "Default" or "Chunked".

<configuration>
  <system.identityModel.services>
    <federationConfiguration>
      <cookieHandler>
        <chunkedCookieHandler>

Syntax

<system.identityModel.services>  
  <federationConfiguration>  
    <cookieHandler mode="Chunked||Default" >  
      <chunkedCookieHandler size=xs:int >  
      </chunkedCookieHandler>  
    </cookieHandler>  
  </federationConfiguration>  
</system.identityModel.services>  

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description
chunkSize The maximum size, in characters, of the HTTP cookie data for any one HTTP cookie. You must be careful when adjusting the chunk size. Web browsers have different limits on the size of cookies and number allowed per domain. For example, the original Netscape specification stipulated these limits: 300 cookies total, 4096 bytes per cookie header (including metadata, not just the cookie value), and 20 cookies per domain. The default is 2000. Required.

Child Elements

None

Parent Elements

Element Description
<cookieHandler> Configures the CookieHandler that the SessionAuthenticationModule (SAM) uses to read and write cookies.

Remarks

When you specify a ChunkedCookieHandler by setting the mode attribute of the <cookieHandler> element to "Default" or "Chunked", you can specify the chunk size that the cookie handler uses to read and write cookies by including a <chunkedCookieHandler> child element and setting its chunkSize attribute. If the <chunkedCookieHandler> element is not present, the default chunk size of 2000 bytes is used. This element cannot be specified when the mode attribute is set to "Custom".

The <chunkedCookieHandler> element is represented by the ChunkedCookieHandlerElement class.

Example

The following example configures a chunked cookie handler that writes cookies in chunks of 3000 bytes.

<cookieHandler mode="Chunked">  
    <chunkedCookieHandler chunkSize=3000/>  
</cookieHandler>  

See also