<disableFusionUpdatesFromADManager > 元素<disableFusionUpdatesFromADManager> Element

指定是否停用預設行為 (亦即允許執行階段主機覆寫應用程式網域的組態設定)。Specifies whether the default behavior, which is to allow the runtime host to override configuration settings for an application domain, is disabled.

<configuration> <configuration>
    <runtime >   <runtime>
     <disableFusionUpdatesFromADManager >    <disableFusionUpdatesFromADManager>

語法Syntax

<disableFusionUpdatesFromADManager enabled="0|1"/>  

屬性和項目Attributes and Elements

下列各節描述屬性、子項目和父項目。The following sections describe attributes, child elements, and parent elements.

屬性Attributes

屬性Attribute 描述Description
enabledenabled 必要屬性。Required attribute.

指定是否停用覆寫融合設定的預設功能。Specifies whether the default ability to override Fusion settings is disabled.

啟用屬性enabled Attribute

Value 描述Description
00 請勿停用覆寫融合設定的功能。Do not disable the ability to override Fusion settings. 這是預設行為,從 .NET Framework 4 開始。This is the default behavior, starting with the .NET Framework 4.
11 停用覆寫融合設定的功能。Disable the ability to override Fusion settings. 這會還原成舊版 .NET Framework 的行為。This reverts to the behavior of earlier versions of the .NET Framework.

子項目Child Elements

無。None.

父項目Parent Elements

項目Element 描述Description
configuration 通用語言執行平台和 .NET Framework 應用程式所使用之每個組態檔中的根項目。The root element in every configuration file used by the common language runtime and .NET Framework applications.
runtime 包含有關組件繫結和記憶體回收的資訊。Contains information about assembly binding and garbage collection.

備註Remarks

從 .NET Framework 4 開始,預設行為是允許 AppDomainManager 物件覆寫設定,方法是使用 ConfigurationFile 屬性或 AppDomainSetup 物件的 SetConfigurationBytes 方法,傳遞給您的 AppDomainManager.InitializeNewDomain 方法的執行方式。,在 AppDomainManager的子類別中。Starting with the .NET Framework 4, the default behavior is to allow the AppDomainManager object to override configuration settings by using the ConfigurationFile property or the SetConfigurationBytes method of the AppDomainSetup object that is passed to your implementation of the AppDomainManager.InitializeNewDomain method, in your subclass of AppDomainManager. 針對預設應用程式域,您所變更的設定會覆寫應用程式佈建檔所指定的設定。For the default application domain, the settings you change override the settings that were specified by the application configuration file. 若是其他應用程式域,則會覆寫傳遞至 AppDomainManager.CreateDomainAppDomain.CreateDomain 方法的設定。For other application domains, they override the configuration settings that were passed to the AppDomainManager.CreateDomain or AppDomain.CreateDomain method.

您可以傳遞新的設定資訊,或傳遞 null (Nothing 在 Visual Basic 中),以排除傳入的設定資訊。You can either pass new configuration information, or pass null (Nothing in Visual Basic) to eliminate configuration information that was passed in.

請勿將設定資訊同時傳遞給 ConfigurationFile 屬性和 SetConfigurationBytes 方法。Do not pass configuration information to both the ConfigurationFile property and the SetConfigurationBytes method. 如果您將設定資訊傳遞至兩者,則會忽略您傳遞給 ConfigurationFile 屬性的資訊,因為 SetConfigurationBytes 方法會覆寫應用程式佈建檔中的設定資訊。If you pass configuration information to both, the information you pass to the ConfigurationFile property is ignored, because the SetConfigurationBytes method overrides configuration information from the application configuration file. 如果您使用 ConfigurationFile 屬性,您可以將 Visual Basic 中的 null (Nothing)傳遞到 SetConfigurationBytes 方法,以排除呼叫 AppDomainManager.CreateDomainAppDomain.CreateDomain 方法時所指定的任何設定位元組。If you use the ConfigurationFile property, you can pass null (Nothing in Visual Basic) to the SetConfigurationBytes method to eliminate any configuration bytes that were specified in the call to the AppDomainManager.CreateDomain or AppDomain.CreateDomain method.

除了設定資訊之外,您還可以在傳遞給您的 AppDomainManager.InitializeNewDomain 方法執行的 AppDomainSetup 物件上變更下列設定: ApplicationBaseApplicationNameCachePathDisallowApplicationBaseProbingDisallowBindingRedirectsDisallowCodeDownloadDisallowPublisherPolicyDynamicBaseLoaderOptimizationPrivateBinPathPrivateBinPathProbeShadowCopyDirectoriesShadowCopyFilesIn addition to configuration information, you can change the following settings on the AppDomainSetup object that is passed to your implementation of the AppDomainManager.InitializeNewDomain method: ApplicationBase, ApplicationName, CachePath, DisallowApplicationBaseProbing, DisallowBindingRedirects, DisallowCodeDownload, DisallowPublisherPolicy, DynamicBase, LoaderOptimization, PrivateBinPath, PrivateBinPathProbe, ShadowCopyDirectories, and ShadowCopyFiles.

除了使用 <disableFusionUpdatesFromADManager> 專案以外,您也可以藉由建立登錄設定或設定環境變數,來停用預設行為。As an alternative to using the <disableFusionUpdatesFromADManager> element, you can disable the default behavior by creating a registry setting or by setting an environment variable. 在登錄中,于 HKCU\Software\Microsoft\.NETFrameworkHKLM\Software\Microsoft\.NETFramework底下建立名為 COMPLUS_disableFusionUpdatesFromADManager 的 DWORD 值,並將值設定為1。In the registry, create a DWORD value named COMPLUS_disableFusionUpdatesFromADManager under HKCU\Software\Microsoft\.NETFramework or HKLM\Software\Microsoft\.NETFramework, and set the value to 1. 在命令列中,將環境變數 COMPLUS_disableFusionUpdatesFromADManager 設為1。At the command line, set the environment variable COMPLUS_disableFusionUpdatesFromADManager to 1.

範例Example

下列範例示範如何使用 <disableFusionUpdatesFromADManager> 專案停用覆寫融合設定的功能。The following example shows how to disable the ability to override Fusion settings by using the <disableFusionUpdatesFromADManager> element.

<configuration>  
   <runtime>  
      <disableFusionUpdatesFromADManager enabled="1" />  
   </runtime>  
</configuration>  

請參閱See also