ApplicationPool.Recycling Property

IIS 7.0
 

Gets recycling settings for the current application pool.

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

public ApplicationPoolRecycling Recycling { get; }

Property Value

Type: Microsoft.Web.Administration.ApplicationPoolRecycling

An ApplicationPoolRecycling object that specifies recycling settings for the current application pool.

You can use the properties and methods of the object returned by this property to configure the recycling behavior of the current application pool. To set default values for all application pools on the server, use the ApplicationPoolDefaults object.

System_CAPS_noteNote

The property values of the ApplicationPoolRecycling object will not be written to the ApplicationHost.config file until the ServerManager.CommitChanges method is called.

The following example checks the value of the ApplicationPoolPeriodicRestart.Time property. If the property is set to a value greater than one day (1440 minutes), the example resets the value to 1440 minutes. This code example is part of a larger example provided for the ApplicationPool class.

Return to top
Show: