Export (0) Print
Expand All

RapidFailProtectionInterval Property

IIS 7.0

Gets or sets the interval of time before the failure count for a process is reset.

Namespace:  Microsoft.Web.Administration
Assembly:  Microsoft.Web.Administration (in Microsoft.Web.Administration.dll)

public TimeSpan RapidFailProtectionInterval { get; set; }

Property Value

Type: System..::..TimeSpan
A System..::..TimeSpan value that indicates the interval of time before the failure count for a process is reset. The default is 5 minutes.

This property specifies the number of minutes before the failure count for a process is reset.

The following example displays the value of the RapidFailProtectionInterval property. If the RapidFailProtection property value is true, this example sets the RapidFailProtectionInterval and RapidFailProtectionMaxCrashes property values. This code example is part of a larger example provided for the ApplicationPoolFailure class.

Console.WriteLine("RapidFailProtectionInterval:\t{0}",
    manager.ApplicationPoolDefaults.Failure.RapidFailProtectionInterval);


...


// If the RapidFailProtection is enabled, set 
// the Interval and maximum crashes properties.
if (manager.ApplicationPoolDefaults.Failure.RapidFailProtection)
{
    manager.ApplicationPoolDefaults.Failure.
        RapidFailProtectionInterval = (TimeSpan.FromMinutes(10));
    manager.ApplicationPoolDefaults.Failure.
        RapidFailProtectionMaxCrashes = 6;
}
// Commit the changes to ApplicationHost.config file.
manager.CommitChanges();


Community Additions

ADD
Show:
© 2014 Microsoft