Export (0) Print
Expand All

RapidFailProtectionMaxCrashes Property

IIS 7.0

Gets or sets the maximum number of failures allowed within the time specified by the RapidFailProtectionInterval property.

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

public long RapidFailProtectionMaxCrashes { get; set; }

Property Value

Type: System..::..Int64
The maximum number of application pool failures allowed. The default is 5.

ExceptionCondition
[T:System:ArgumentOutOfRangeException]

The value is less than 0 or greater than 4294967295.

This property specifies the maximum number of failures allowed within the number of minutes specified by the RapidFailProtectionInterval property.

The following example displays the value of the RapidFailProtectionMaxCrashes 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