HttpRuntimeSection.ExecutionTimeout Egenskap

Definition

Hämtar eller anger den tillåtna körningstiden för begäran.

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

Egenskapsvärde

Ett TimeSpan värde som anger den tillåtna körningstiden för begäran.

Attribut

Undantag

Körningstiden för begäran överskred gränsen som angavs vid tidsgränsen för körningen.

Exempel

I följande exempel visas hur du använder egenskapen ExecutionTimeout .

// 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);
' 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)

Kommentarer

Egenskapen ExecutionTimeout anger det maximala antalet sekunder som en begäran tillåts köra innan den stängs av automatiskt av ASP.NET. Standardvärdet är 110 sekunder. Den här tidsgränsen gäller endast om felsökningsattributet i elementet <compilation> är inställt på false.

Om tidsgränsen upphör att gälla utlöses ett undantag. Du kan registrera relaterad information i programmappen i händelseloggen. Det gör du genom att aktivera programhälsoövervakning i konfigurationselementet <healthMonitoring> .

Gäller för