啟用或停用組態檔的驗證檢查。
Syntax
class ValidationSection : ConfigurationSection
方法
下表列出 類別所 ValidationSection 公開的方法。
| 名稱 | 描述 |
|---|---|
| GetAllowDefinition | (繼承自 ConfigurationSection.) |
| GetAllowLocation | (繼承自 ConfigurationSection。) |
| RevertToParent | (繼承自 ConfigurationSection。) |
| SetAllowDefinition | (繼承自 ConfigurationSection。) |
| SetAllowLocation | (繼承自 ConfigurationSection。) |
屬性
下表列出 類別所 ValidationSection 公開的屬性。
| 名稱 | 描述 |
|---|---|
Location |
(繼承自 ConfigurationSection .) 金鑰屬性。 |
Path |
(繼承自 ConfigurationSection .) 金鑰屬性。 |
SectionInformation |
(繼承自 ConfigurationSection。) |
ValidateIntegratedModeConfiguration |
讀取/寫入 boolean 值。 true 如果 IIS 在偵測到應該修改 ASP.NET 1.0 Web 應用程式以在整合模式中執行時產生移轉錯誤訊息,則為 ;否則為 false 。 預設值是 true。 如需此屬性的詳細資訊,請參閱一節。 |
子類別
這個類別不包含子類別。
備註
如果 ValidateIntegratedModeConfiguration 已啟用 屬性,且下列其中一項成立,IIS 會產生移轉錯誤訊息:
您的應用程式在其Web.config檔案中定義區
<httpModules>段。在 IIS 7 整合模式中,ASP.NET 模組會以統
<modules>一區段中<system.webServer>的原生模組指定。您的應用程式在其Web.config檔案中定義區
<httpHandlers>段。在 IIS 7 整合模式中,ASP.NET 處理常式對應是在 內的
<system.webServer>整合<handlers>區段中指定。 區<handlers>段會取代 ASP.NET<httpHandlers>和 IIS script-processor-mapping 組態,這兩者都是設定 ASP.NET 1.0 處理常式對應所需的組態。應用程式的Web.config檔案會
<identity impersonate="true" />指定 。在 IIS 7 整合模式中,某些早期要求處理階段不提供用戶端模擬。 因此,IIS 會產生移轉錯誤訊息。 如果您的 ASP.NET Web 應用程式模擬用戶端認證, (內部網路案例最常) ,您可能想要將
ValidateIntegratedModeConfiguration屬性設定為false。如果您手動移轉設定,或未移轉設定,但您希望 IIS 保持整合模式 (您應該避免) ,您可以將 屬性設定
ValidateIntegratedModeConfiguration為false來停用移轉錯誤訊息。
注意
因為 IIS 在 為 false 時 ValidateIntegratedModeConfiguration 不再提供不支援組態的警告,請在進行此設定之前,請確定您的應用程式在整合模式中正常運作。
繼承階層架構
ValidationSection
規格需求
| 類型 | 描述 |
|---|---|
| Client | - Windows Vista 上的 IIS 7.0 - Windows 7 上的 IIS 7.5 - Windows 8 上的 IIS 8.0 - Windows 10上的 IIS 10.0 |
| 伺服器 | - Windows Server 2008 上的 IIS 7.0 - Windows Server 2008 R2 上的 IIS 7.5 - Windows Server 2012 上的 IIS 8.0 - Windows Server 2012 R2 上的 IIS 8.5 - Windows Server 2016上的 IIS 10.0 |
| 產品 | - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0 |
| MOF 檔案 | WebAdministration.mof |