<bypassTrustedAppStrongNames> 元素<bypassTrustedAppStrongNames> Element

指定是否以跳过上加载到完全信任的完全信任程序集的强名称验证AppDomainSpecifies whether to bypass the validation of strong names on full-trust assemblies that are loaded into a full-trust AppDomain.

<configuration><configuration>
<运行时 ><runtime>
<bypassTrustedAppStrongNames><bypassTrustedAppStrongNames>

语法Syntax

<bypassTrustedAppStrongNames    
   enabled="true|false"/>  

特性和元素Attributes and Elements

下列各节描述了特性、子元素和父元素。The following sections describe attributes, child elements, and parent elements.

特性Attributes

特性Attribute 描述Description
enabled 必需的特性。Required attribute.

指定是否启用可避免验证完全信任程序集的强名称跳过功能。Specifies whether the bypass feature that avoids validating strong names for full-trust assemblies is enabled. 启用此功能后,强名称的程序集加载时不验证正确。When this feature is enabled, strong names are not validated for correctness when the assembly is loaded. 默认值为 trueThe default is true.

enabled 特性enabled Attribute

Value 描述Description
true 加载到完全信任程序集时,不会验证在完全信任程序集的强名称签名AppDomainStrong-name signatures on full-trust assemblies are not validated when the assemblies are loaded into a full-trust AppDomain. 这是默认设置。This is the default.
false 在完全信任程序集的强名称签名进行验证时将其加载到完全信任程序集AppDomainStrong-name signatures on full-trust assemblies are validated when the assemblies are loaded into a full-trust AppDomain. 仅检查签名正确性; 强名称签名与另一个强名称的匹配项,它不进行比较。The strong-name signature is checked only for signature correctness; it is not compared to another strong name for a match.

子元素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

强名称跳过功能可避免完全信任程序集的强名称签名验证的开销。The strong-name bypass feature avoids the overhead of strong-name signature verification of full-trust assemblies.

跳过功能适用于使用强名称进行签名及具有以下特征的任何程序集:The bypass feature applies to any assembly that is signed with a strong name and that has the following characteristics:

  • 完全受信任而无需StrongName证据 (例如,具有MyComputer区域证据)。Fully trusted without the StrongName evidence (for example, has MyComputer zone evidence).

  • 加载到完全受信任的 AppDomainLoaded into a fully trusted AppDomain.

  • 加载自该 AppDomainApplicationBase 属性下的某个位置。Loaded from a location under the ApplicationBase property of that AppDomain.

  • 签名没有延迟。Not delay-signed.

备注

如果跳过功能已禁用的计算机上的所有应用程序使用注册表项,则此配置文件设置无效。If the bypass feature has been turned off for all applications on the computer by using a registry key, this configuration file setting has no effect. 有关详细信息,请参阅如何:禁用强名称绕过功能For more information, see How to: Disable the Strong-Name Bypass Feature.

示例Example

下面的示例演示如何指定验证上完全信任程序集的强名称签名的行为。The following example shows how to specify the behavior that validates the strong-name signature on full-trust assemblies.

<configuration>  
   <runtime>  
      <bypassTrustedAppStrongNames enabled="false"/>  
   </runtime>  
</configuration>  

请参阅See also