ApplicationPool.Name 属性

定义

获取或设置当前应用程序池的名称。

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String

属性值

当前应用程序池的名称。

示例

以下示例列出应用程序池名称以及其他应用程序池属性的值。 此代码示例是为 ApplicationPool 类提供的一个更大示例的一部分。

// If the applicationPool is stopped, restart it.
if (applicationPool.State == ObjectState.Stopped)
{
    applicationPool.Start();
}

注解

可以使用此属性来配置当前应用程序池的名称。 若要为服务器上的所有应用程序池设置默认值,请使用 ApplicationPoolDefaults 对象。

适用于