<chunkedCookieHandler>

.NET Framework 4.6 and 4.5

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

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

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.

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.

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

    <cookieHandler mode="Chunked">
        <chunkedCookieHandler chunkSize=3000/>
    </cookieHandler>
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft