Share via


ApplicationPoolCollection.Add(String) Method

Definition

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

public:
 Microsoft::Web::Administration::ApplicationPool ^ Add(System::String ^ name);
public Microsoft.Web.Administration.ApplicationPool Add (string name);
override this.Add : string -> Microsoft.Web.Administration.ApplicationPool
Public Function Add (name As String) As ApplicationPool

Parameters

name
String

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

Returns

The newly created ApplicationPool object with the name parameter.

Exceptions

The name parameter is empty or null.

Remarks

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.

Applies to