Upravit

Sdílet prostřednictvím


SessionStateSection.StateNetworkTimeout Property

Definition

Gets or sets the amount of time the network connection between the Web server and the state server can remain idle.

public:
 property TimeSpan StateNetworkTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsOrInfiniteConverter))]
[System.Configuration.ConfigurationProperty("stateNetworkTimeout", DefaultValue="00:00:10")]
public TimeSpan StateNetworkTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsOrInfiniteConverter))>]
[<System.Configuration.ConfigurationProperty("stateNetworkTimeout", DefaultValue="00:00:10")>]
member this.StateNetworkTimeout : TimeSpan with get, set
Public Property StateNetworkTimeout As TimeSpan

Property Value

The time, in seconds, that the network connection between the Web server and the state server can remain idle before the session is abandoned. The default value is 10 seconds.

Attributes

Examples

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

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

Remarks

This sessionStateSection attribute is required when the Mode property is set to StateServer.

Applies to