ApplicationPoolCollection.Add Method (String)

IIS 7.0

Adds the application pool that has the specified name to the collection.

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

public ApplicationPool Add(
	string name


Type: System.String

The name of the ApplicationPool object to add to the collection.

Return Value

Type: Microsoft.Web.Administration.ApplicationPool

The newly created ApplicationPool object with the name parameter.

Exception Condition

The name parameter is empty or null.

A validation check is performed on the name parameter before the ApplicationPool object is created. If the name parameter contains any of the invalid application pool name characters defined in the InvalidApplicationPoolNameCharacters method, an error message is generated.

Return to top