HttpRuntimeSection.ShutdownTimeout Property

Definition

Gets or sets the length of time the application is allowed to idle before it is terminated.

C#
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))]
[System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:01:30")]
public TimeSpan ShutdownTimeout { get; set; }

Property Value

A TimeSpan value that indicates the length of time the application is allowed to idle before it is terminated.

Attributes

Examples

The following example shows how to use the ShutdownTimeout property.

C#
// Get the ShutdownTimeout property value.
Response.Write("ShutdownTimeout: " +
  configSection.ShutdownTimeout.ToString() + "<br>");

// Set the ShutdownTimeout property value to 2 minutes.
configSection.ShutdownTimeout = TimeSpan.FromMinutes(2);

Remarks

The ShutdownTimeout property indicates the amount of time before an application is shut down gracefully. The default is 90 seconds.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1