.NET Framework Class Library
HttpRuntimeSection..::.ExecutionTimeout Property

Gets or sets the allowed execution time for the request.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)
Syntax

Visual Basic (Declaration)
<ConfigurationPropertyAttribute("executionTimeout", DefaultValue := "00:01:50")> _
<TypeConverterAttribute(GetType(TimeSpanSecondsConverter))> _
<TimeSpanValidatorAttribute(MinValueString := "00:00:00", MaxValueString := "10675199.02:48:05.4775807")> _
Public Property ExecutionTimeout As TimeSpan
Visual Basic (Usage)
Dim instance As HttpRuntimeSection
Dim value As TimeSpan

value = instance.ExecutionTimeout

instance.ExecutionTimeout = value
C#
[ConfigurationPropertyAttribute("executionTimeout", DefaultValue = "00:01:50")]
[TypeConverterAttribute(typeof(TimeSpanSecondsConverter))]
[TimeSpanValidatorAttribute(MinValueString = "00:00:00", MaxValueString = "10675199.02:48:05.4775807")]
public TimeSpan ExecutionTimeout { get; set; }
Visual C++
[ConfigurationPropertyAttribute(L"executionTimeout", DefaultValue = L"00:01:50")]
[TypeConverterAttribute(typeof(TimeSpanSecondsConverter))]
[TimeSpanValidatorAttribute(MinValueString = L"00:00:00", MaxValueString = L"10675199.02:48:05.4775807")]
public:
property TimeSpan ExecutionTimeout {
    TimeSpan get ();
    void set (TimeSpan value);
}
JScript
public function get ExecutionTimeout () : TimeSpan
public function set ExecutionTimeout (value : TimeSpan)

Property Value

Type: System..::.TimeSpan
A TimeSpan value that indicates the allowed execution time for the request.
Exceptions

ExceptionCondition
HttpException

The request execution time exceeded the limit set by the execution time-out.

Remarks

The ExecutionTimeout property indicates the maximum number of seconds a request is allowed to execute before being automatically shut down by ASP.NET. The default is 110 seconds. This time-out applies only if the debug attribute in the <compilation> element is set to false.

If the time-out expires an exception is raised. You can record the related information in the Application folder of the Event Log. You do this by enabling the application health monitoring in the ><healthMonitoring> configuration element.

Examples

The following example shows how to use the ExecutionTimeout property.

Visual Basic
' Get the ExecutionTimeout property value.
Response.Write("ExecutionTimeout: " & _
  configSection.ExecutionTimeout.ToString() & "<br>")

' Set the ExecutionTimeout property value to 2 minutes.
configSection.ExecutionTimeout = TimeSpan.FromMinutes(2)
C#
// Get the ExecutionTimeout property value.
Response.Write("ExecutionTimeout: " +
  configSection.ExecutionTimeout.ToString() + "<br>");

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

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0
See Also

Reference

Other Resources

Tags :


Page view tracker