HostingEnvironmentSection.ShutdownTimeout Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the amount of time, in seconds, to gracefully shut down the application.
public:
property TimeSpan ShutdownTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))]
[System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:00:30")]
[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]
public TimeSpan ShutdownTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanSecondsConverter))>]
[<System.Configuration.ConfigurationProperty("shutdownTimeout", DefaultValue="00:00:30")>]
[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")>]
member this.ShutdownTimeout : TimeSpan with get, set
Public Property ShutdownTimeout As TimeSpan
A TimeSpan that is the specified number of seconds to gracefully shut down the application. The default is 30 seconds.
- Attributes
The following code example shows how to use the ShutdownTimeout property. This code example is part of a larger example provided for the HostingEnvironmentSection class.
// Display ShutdownTimeout property
Console.WriteLine("Shutdown Timeout: {0}", configSection.ShutdownTimeout);
' Display the ShutdownTimeout property
Console.WriteLine("Shutdown Timeout: {0}", configSection.ShutdownTimeout)
The default value for the ShutdownTimeout property is 30 seconds. This setting can be set at the machine or application level. If this setting is defined at any other configuration level, it is ignored. If a debugger is attached to the application, the application will not be shut down.
Производ | Верзије |
---|---|
.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 |
.NET повратне информације
.NET је пројекат отвореног кода. Изаберите везу да бисте обезбедили повратне информације: