This documentation is archived and is not being maintained.

AnonymousIdentificationSection.CookieTimeout Property

Gets or sets the amount of time, in minutes, after which the authentication expires.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

[TypeConverterAttribute(typeof(TimeSpanMinutesOrInfiniteConverter))] 
public TimeSpan CookieTimeout { get; set; }
/** @property */
public TimeSpan get_CookieTimeout ()

/** @property */
public void set_CookieTimeout (TimeSpan value)

public function get CookieTimeout () : TimeSpan

public function set CookieTimeout (value : TimeSpan)

Not applicable.

Property Value

The amount of time, in minutes, after which the authentication expires. The default value is 100000.

This property can be set to an arbitrarily large value, but internally the CookieTimeout value is limited to a maximum value of two years.

The following code example shows how to access the CookieTimeout property.

// Get CookieTimeout.
TimeSpan cookieTimeout =
    anonymousIdentificationSection.CookieTimeout;
Console.WriteLine("Cookie timeout: {0}",
    cookieTimeout.ToString());

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Show: