ApplicationPool.State Property

IIS 7.0
 

Gets the run-time state of the current application pool.

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

public ObjectState State { get; }

Property Value

Type: Microsoft.Web.Administration.ObjectState

One of the ObjectState values.

Valid values are Starting, Started, Stopping, Stopped, and Unknown.

You can modify the value of the State property in the Actions pane of IIS Manager when the application pool is selected.

The following example checks the value of the State property. If the application pool is stopped, the example starts it. This code example is part of a larger example provided for the ApplicationPool class.

Return to top
Show: