ApplicationPoolDefaults クラス

定義

Web サーバー上のすべてのアプリケーション プールの既定値を構成します。

public ref class ApplicationPoolDefaults sealed : Microsoft::Web::Administration::ConfigurationElement
public sealed class ApplicationPoolDefaults : Microsoft.Web.Administration.ConfigurationElement
type ApplicationPoolDefaults = class
    inherit ConfigurationElement
Public NotInheritable Class ApplicationPoolDefaults
Inherits ConfigurationElement
継承
ApplicationPoolDefaults

次の例では、いくつかのアプリケーション プールの既定値を表示し、元の既定値から 3 つのプロパティを変更し、新しいアプリケーション プールを作成してコミットします。

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Administration;
using Microsoft.Web.Management;

namespace AdministrationSnippets
{
    class ApplicationPoolDefaults
    {
        public void GetApplicationPoolDefaults()
        {
            ServerManager manager = new ServerManager();
            // Get the application pool defaults.
            Console.WriteLine("AutoStart:\t{0}",
                manager.ApplicationPoolDefaults.AutoStart.ToString());
            Console.WriteLine("Cpu.Limit:\t{0}",
                manager.ApplicationPoolDefaults.Cpu.Limit.ToString());
            Console.WriteLine("   Action:\t{0}",
                manager.ApplicationPoolDefaults.Cpu.Action.ToString());
            Console.WriteLine("Enable32BitAppOnWin64:\t{0}",
                manager.ApplicationPoolDefaults.Enable32BitAppOnWin64.ToString());
            Console.WriteLine("Failure.RapidFailProtection:\t{0}",
                manager.ApplicationPoolDefaults.Failure.RapidFailProtection.ToString());
            Console.WriteLine("   RapidFailProtectionInterval:\t{0}",
                manager.ApplicationPoolDefaults.Failure.RapidFailProtectionInterval.ToString());
            Console.WriteLine("ManagedPipelineMode:\t{0}",
                manager.ApplicationPoolDefaults.ManagedPipelineMode.ToString());
            Console.WriteLine("ManagedRuntimeVersion:\t{0}",
                manager.ApplicationPoolDefaults.ManagedRuntimeVersion.ToString());
            Console.WriteLine("ProcessModel.IdentityType:\t{0}",
                manager.ApplicationPoolDefaults.ProcessModel.IdentityType.ToString());
            Console.WriteLine("ProcessModel.Password:\t{0}",
                manager.ApplicationPoolDefaults.ProcessModel.Password.ToString());
            Console.WriteLine("QueueLength:\t{0}",
                manager.ApplicationPoolDefaults.QueueLength.ToString());
            Console.WriteLine("PeriodicRestart.Memory:\t{0}",
                manager.ApplicationPoolDefaults.Recycling.PeriodicRestart.Memory.ToString());
            Console.WriteLine("   Time:\t\t\t{0}",
                manager.ApplicationPoolDefaults.Recycling.PeriodicRestart.Time.ToString());
            // Set default properties for any new application pools.
            manager.ApplicationPoolDefaults.AutoStart = false;
            manager.ApplicationPoolDefaults.Cpu.Limit = 26;
            manager.ApplicationPoolDefaults.Recycling.PeriodicRestart.Time = TimeSpan.FromMinutes(1000);
            // Create a new application pool.
            ApplicationPoolCollection applicationPoolCollection = manager.ApplicationPools;
            applicationPoolCollection.Add("new app pool");
            // Commit the changes to ApplicationHost.config file.
            manager.CommitChanges();
        }
    }
}

注釈

このクラスは、IIS 構成システムのアプリケーション プールの既定の設定を表します。 プロパティは、applicationPools 要素の applicationPoolDefaults 要素の属性と要素に対応します。

アプリケーション プールが作成されると、 クラスの値が ApplicationPoolDefaults 呼び出されます。 このクラスのいずれかのプロパティ値が変更された場合は、 メソッドを CommitChanges 呼び出して、ApplicationHost.config ファイルと IIS マネージャーに値を保持する必要があります。

個々のアプリケーション プール設定は、このクラスで定義されている既定値をオーバーライドできます。

プロパティ

Attributes

この要素の属性の一覧を含む構成属性コレクションを取得します。

(継承元 ConfigurationElement)
AutoStart

IIS の起動時にアプリケーション プールが自動的に開始されるかどうかを示す値を取得または設定します。

ChildElements

現在の要素のすべての子要素を取得します。

(継承元 ConfigurationElement)
Cpu

アプリケーション プールの CPU 使用率パラメーターを取得します。

ElementTagName

Web サーバー上のすべてのアプリケーション プールの既定値を構成します。

(継承元 ConfigurationElement)
Enable32BitAppOnWin64

64 ビット プロセッサを搭載したコンピューターで 32 ビット アプリケーションの実行を許可するかどうかを示す値を取得または設定します。

Failure

アプリケーション プールが失敗したときに実行するアクションを取得します。

IsLocallyStored

構成要素が特定の構成ファイルに格納されているかどうかを示す値を取得します。

(継承元 ConfigurationElement)
Item[String]

指定した名前の属性を取得または設定します。

(継承元 ConfigurationElement)
ManagedPipelineMode

アプリケーション プール内のマネージド アプリケーションの要求処理パイプライン モードを示す値を取得または設定します。

ManagedRuntimeVersion

アプリケーション プール内のマネージド アプリケーションに使用される.NET Frameworkのバージョンを取得または設定します。

Methods

構成要素のメソッドのコレクションを取得します。

(継承元 ConfigurationElement)
ProcessModel

アプリケーション プールのプロセス管理属性を取得します。

QueueLength

要求が拒否される前にアプリケーション プールのキューに入れる要求の最大数を取得または設定します。

RawAttributes

Web サーバー上のすべてのアプリケーション プールの既定値を構成します。

(継承元 ConfigurationElement)
Recycling

アプリケーション プールのリサイクル設定を取得します。

Schema

現在の要素のスキーマを取得します。

(継承元 ConfigurationElement)
StartMode

Web サーバー上のすべてのアプリケーション プールの既定値を構成します。

メソッド

Delete()

Web サーバー上のすべてのアプリケーション プールの既定値を構成します。

(継承元 ConfigurationElement)
GetAttribute(String)

要求された属性を ConfigurationAttribute 表す オブジェクトを返します。

(継承元 ConfigurationElement)
GetAttributeValue(String)

指定した属性の値を返します。

(継承元 ConfigurationElement)
GetChildElement(String)

現在の構成要素の下にあり、指定した名前を持つ子要素を返します。

(継承元 ConfigurationElement)
GetChildElement(String, Type)

現在の構成要素の下にあり、指定した名前と型を持つ子要素を返します。

(継承元 ConfigurationElement)
GetCollection()

現在の構成要素の既定のコレクションを返します。

(継承元 ConfigurationElement)
GetCollection(String)

現在の構成要素に属するすべての構成要素を返します。

(継承元 ConfigurationElement)
GetCollection(String, Type)

指定した名前と型を持ち、現在の構成要素の下にある構成要素を返します。

(継承元 ConfigurationElement)
GetCollection(Type)

指定した型を持ち、現在の構成要素の下にある構成要素を返します。

(継承元 ConfigurationElement)
GetMetadata(String)

要素スキーマからメタデータ値を返します。

(継承元 ConfigurationElement)
SetAttributeValue(String, Object)

指定した属性の値を設定します。

(継承元 ConfigurationElement)
SetMetadata(String, Object)

要素スキーマのメタデータ値を設定します。

(継承元 ConfigurationElement)

適用対象

こちらもご覧ください