<customCookieHandler>
Sets the custom cookie handler type. This element may only be present if the mode
attribute of the <cookieHandler>
element is "Custom". The custom type must be derived from the CookieHandler class.
<configuration>
<system.identityModel.services>
<federationConfiguration>
<cookieHandler>
<customCookieHandler>
<system.identityModel.services>
<federationConfiguration>
<cookieHandler mode="Custom">
<customCookieHandler type="MyNamespace.MyCustomCookieHandler, MyAssembly" >
</customCookieHandler>
</cookieHandler>
</federationConfiguration>
</system.identityModel.services>
The following sections describe attributes, child elements, and parent elements.
Attribute | Description |
---|---|
type | Specifies a custom type that derives from the CookieHandler class. |
None
Element | Description |
---|---|
<cookieHandler> | Configures the CookieHandler that the SessionAuthenticationModule uses to read and write cookies. |
When you specify a custom cookie handler by setting the mode
attribute of the <cookieHandler>
element to "Custom", you must specify the type of the custom cookie handler by including a <customCookieHandler>
child element that references the cookie handler type. This element cannot be specified when the mode
attribute is set to "Chunked" or "Default". Custom cookie handlers must derive from the CookieHandler class.
The <customCookieHandler>
element is represented by the CustomTypeElement class.
The following example configures the SAM to use a custom cookie handler of type MyNamespace.MyCustomCookieHandler
.
<cookieHandler mode="Custom">
<customCookieHandler type="MyNamespace.MyCustomCookieHandler, MyAssembly" />
</cookieHandler>