ApplicationPoolFailure.RapidFailProtectionMaxCrashes Property

Definition

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

public:
 property long RapidFailProtectionMaxCrashes { long get(); void set(long value); };
public long RapidFailProtectionMaxCrashes { get; set; }
member this.RapidFailProtectionMaxCrashes : int64 with get, set
Public Property RapidFailProtectionMaxCrashes As Long

Property Value

The maximum number of application pool failures allowed. The default is 5.

Exceptions

System:ArgumentOutOfRangeException

The value is less than 0 or greater than 4294967295.

Examples

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();

Remarks

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

Applies to