SessionStateSection.Timeout Property

Gets or sets the session time-out

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

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

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

public function get Timeout () : TimeSpan

public function set Timeout (value : TimeSpan)

Not applicable.

Property Value

The session time-out, in minutes. The default value is 20 minutes.

The Timeout property cannot be set to a value greater than 525,601 minutes (1 year).

The following code example demonstrates how to get the Timeout property. Refer to the code example in the SessionStateSection class topic to learn how to access the SessionStateSection object.

// Display the current Timeout property value.
Console.WriteLine("Timeout: {0}",
  sessionStateSection.Timeout);

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: