Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Cpu Property

IIS 7.0

Gets CPU usage parameters for the current application pool.

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

public ApplicationPoolCpu Cpu { get; }

Property Value

Type: Microsoft.Web.Administration..::..ApplicationPoolCpu
An ApplicationPoolCpu object that contains CPU usage parameters.

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

NoteNote:

The property values of the ApplicationPoolCpu 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 ApplicationPoolCpu..::..Limit property. If the property is set to a value greater than 25, the example resets the value to 25. This code example is part of a larger example provided for the ApplicationPool class.

// Set the CPU limit to a maximum of 25.
if (applicationPool.Cpu.Limit > 25)
{
    applicationPool.Cpu.Limit = 25;
}


Community Additions

ADD
Show:
© 2015 Microsoft