Udostępnij za pośrednictwem


FormsAuthenticationConfiguration.Timeout Właściwość

Definicja

Pobiera lub ustawia limit czasu uwierzytelniania.

public:
 property TimeSpan Timeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesConverter))]
[System.Configuration.ConfigurationProperty("timeout", DefaultValue="00:30:00")]
[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:01:00")]
public TimeSpan Timeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesConverter))>]
[<System.Configuration.ConfigurationProperty("timeout", DefaultValue="00:30:00")>]
[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:01:00")>]
member this.Timeout : TimeSpan with get, set
Public Property Timeout As TimeSpan

Wartość właściwości

Czas w minutach, po którym wygasa uwierzytelnianie. Wartość domyślna to 30 minut.

Atrybuty

Przykłady

Poniższy przykład kodu pokazuje, jak uzyskać dostęp do Timeout właściwości. Zapoznaj się z przykładem kodu w temacie FormsAuthenticationConfiguration klasy, aby dowiedzieć się, jak uzyskać sekcję.

// Get the current Timeout.
System.TimeSpan currentTimeout =
    formsAuthentication.Timeout;

// Set the Timeout.
formsAuthentication.Timeout =
    System.TimeSpan.FromMinutes(10);
' Get the current Timeout.
Dim currentTimeout As System.TimeSpan =
formsAuthentication.Timeout

' Set the Timeout.
formsAuthentication.Timeout =
System.TimeSpan.FromMinutes(10)

Dotyczy

Zobacz też