共用方式為


healthMonitoring 設定檔的 add 項目 (ASP.NET 設定結構描述)

將設定檔加入設定檔集合。

這個項目是 .NET Framework 2.0 版中新增的項目。

<add
     name="profile name"
     minimumInstances="minimum number of event occurrences"
     maximumLimit="maximum number of event occurrences"
     minimumInterval="minimum interval between events" />

屬性和項目

下列小節描述本小節所述的屬性、子項目和父項目。

屬性

屬性

描述

name

必要的 String 屬性。

指定設定檔名稱。

minimumInstances

必要的 Int32 屬性。

指定引發事件之前的最小出現次數。

預設值為 1。

maximumLimit

必要 Int32 屬性。

指定在超出後便會停止引發事件的臨界值。

預設值為 "Infinite"。

minimumInterval

必要 TimeSpan 屬性。

指定兩個事件之間的最小時間間隔,以 "hh:mm:ss" 表示。

預設值為 "00:00:00"。

子項目

無。

父項目

項目

描述

configuration

指定 Common Language Runtime 和 .NET Framework 應用程式所使用之每個組態檔中的根項目 (Root Element)。

system.web

指定 ASP.NET 組態區段的根項目。

healthMonitoring

設定健康監視的應用程式。

profiles

定義設定事件時可以使用的參數集集合。

備註

add 項目讓您能夠收集在設定事件時經常使用的參數集。 每個參數集定義一個設定檔。

預設的組態

下列預設 add 項目是在 .NET Framework 2.0 版中的根目錄 Web.config 檔中設定的。

<add name="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom="" />
<add name="Critical" minInstances="1" maxLimit="Infinite" minInterval="00:00:00" custom="" />

範例

下列程式碼範例會示範如何設定設定檔。

<healthMonitoring Enabled="true" heartBeatInterval="0">

  <profiles>
    <add name="Default"
      minInstances="1"
      maxLimit="Infinite"
      minInterval="00:01:00"/>
  </profiles>

</healthMonitoring>

項目資訊

組態區段處理常式

System.Web.Configuration.HealthMonitoringSection

組態成員

HealthMonitoringSection.Profiles

可設定的位置

Machine.config

根層次的 Web.config

應用程式層級的 Web.config

需求

Microsoft Internet Information Services (IIS) 5.0、5.1 或 6.0 版

.NET Framework 2.0 版

Microsoft Visual Studio 2005

請參閱

工作

HOW TO:鎖定 ASP.NET 組態設定

參考

healthMonitoring 項目 (ASP.NET 設定結構描述)

healthMonitoring 的 profiles 項目 (ASP.NET 設定結構描述)

healthMonitoring 之 profiles 的 remove 項目 (ASP.NET 設定結構描述)

healthMonitoring 之 profiles 的 clear 項目 (ASP.NET 設定結構描述)

System.Configuration

System.Web.Configuration

概念

ASP.NET 組態概觀

ASP.NET Web 伺服器控制項和瀏覽器能力

保護 ASP.NET 組態

ASP.NET 組態案例

其他資源

ASP.NET 組態檔

ASP.NET 組態設定

一般組態設定 (ASP.NET)

ASP.NET 組態 API