Export (0) Print
Expand All

ChunkedCookieHandler Class

.NET Framework 4.5

Represents a cookie handler that writes cookie data so that cookies never exceed a set size.

System.Object
  System.IdentityModel.Services.CookieHandler
    System.IdentityModel.Services.ChunkedCookieHandler

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

public sealed class ChunkedCookieHandler : CookieHandler

The ChunkedCookieHandler type exposes the following members.

  NameDescription
Public methodChunkedCookieHandler()Initializes a new instance of the ChunkedCookieHandler class that uses the default chunk size.
Public methodChunkedCookieHandler(Int32)Initializes a new instance of the ChunkedCookieHandler class that uses a specified chunk size.
Top

  NameDescription
Public propertyChunkSizeGets the chunk size used by the current instance.
Public propertyDomainGets or sets the domain used for cookies. (Inherited from CookieHandler.)
Public propertyHideFromClientScriptGets or sets a value that indicates whether the cookie should be hidden from client script. (Inherited from CookieHandler.)
Public propertyNameGets or sets the base name for cookies written by the handler. (Inherited from CookieHandler.)
Public propertyPathGets or sets the virtual path for cookies written by the handler. (Inherited from CookieHandler.)
Public propertyPersistentSessionLifetimeThe lifetime of persistent sessions. If zero, transient sessions are always used. (Inherited from CookieHandler.)
Public propertyRequireSslGets or sets a value that specifies whether the cookie should be used only with SSL. (Inherited from CookieHandler.)
Top

  NameDescription
Public methodDelete()Deletes the cookie associated with the current request that has the default name, domain, and path. (Inherited from CookieHandler.)
Public methodDelete(HttpContext)Deletes the cookie associated with the current request that has the default name, domain, and path. (Inherited from CookieHandler.)
Public methodDelete(String)Deletes the cookie associated with the current request that has the specified name and the default domain and path. (Inherited from CookieHandler.)
Public methodDelete(String, HttpContext)Deletes the cookie associated with the specified request that has the specified name and the default domain and path. (Inherited from CookieHandler.)
Public methodDelete(String, String, String, HttpContext)Deletes the cookie associated with the specified request that has the specified name, path, and domain. (Inherited from CookieHandler.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodMatchCookiePathIf the target domain is within the cookie domain and the target path is within the cookie path, match the casing of the cookie path portion. (Inherited from CookieHandler.)
Public methodRead()Reads the cookie associated with the current request that has the default name. (Inherited from CookieHandler.)
Public methodRead(HttpContext)Reads the cookie associated with the current request that has the default name, domain, and path. (Inherited from CookieHandler.)
Public methodRead(String)Reads the cookie associated with the current request that has the specified name. (Inherited from CookieHandler.)
Public methodRead(String, HttpContext)Reads the cookie associated with the specified request that has the specified name and the default domain and path. (Inherited from CookieHandler.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWrite(Byte[], Boolean, DateTime)Writes a cookie associated with the current request that has the specified value, persistence, and expiration time. (Inherited from CookieHandler.)
Public methodWrite(Byte[], String, DateTime)Writes a cookie associated with the current request that has the specified name, value, and expiration time. (Inherited from CookieHandler.)
Public methodWrite(Byte[], String, DateTime, HttpContext)Writes a cookie associated with the specified request that has the specified name, value, and expiration time. (Inherited from CookieHandler.)
Public methodWrite(Byte[], String, String, String, DateTime, Boolean, Boolean, HttpContext)Writes a cookie associated with the specified request that has the specified name, value, domain, path, expiration time, and visibility. (Inherited from CookieHandler.)
Top

  NameDescription
Public fieldStatic memberDefaultChunkSizeThe default chunk size of 2000 characters.
Public fieldStatic memberMinimumChunkSizeThe minimum chunk size of 1000 characters.
Top

The ChunkedCookieHandler class presents the cookie as a logical entity, so that, in the case of cookies with a size that exceeds a specified threshold (the chunk size), a single call to the Write method breaks the data into a series of actual client-side cookies, none of which exceeds the chunk size.

Cookie names are constructed based on the name parameter to the Write, Read, or Delete methods. The cookie names are constructed by appending a number to the base name: name, name1, name2, and so on.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft