AppDomainSetup.DisallowPublisherPolicy AppDomainSetup.DisallowPublisherPolicy AppDomainSetup.DisallowPublisherPolicy AppDomainSetup.DisallowPublisherPolicy Property


获取或设置一个值,该值指示是否将配置文件的 <publisherPolicy> 部分应用于应用程序域。Gets or sets a value that indicates whether the <publisherPolicy> section of the configuration file is applied to an application domain.

 property bool DisallowPublisherPolicy { bool get(); void set(bool value); };
public bool DisallowPublisherPolicy { get; set; }
member this.DisallowPublisherPolicy : bool with get, set
Public Property DisallowPublisherPolicy As Boolean


如果应用程序域忽略配置文件的 true 节,则为 <publisherPolicy>;如果接受所声明的发行者策略,则为 falsetrue if the <publisherPolicy> section of the configuration file for an application domain is ignored; false if the declared publisher policy is honored.


DisallowPublisherPolicy属性专门适用于在本地加载的 Web 应用程序。The DisallowPublisherPolicy property specifically applies to a Web application that is loaded locally. 使用此属性可帮助防止恶意尝试在安全模式下执行不安全的 Web 应用程序。Use this property to help prevent a malicious attempt to execute an unsafe Web application in safe mode.

有关跳过发行者策略的详细信息,请参阅重定向程序集版本主题。For more information about bypassing publisher policy, see the Redirecting Assembly Versions topic. 有关安全模式的详细信息,请参阅运行时如何定位程序集主题的 "检查配置文件" 部分。For more information about safe mode, see the "Examining the Configuration Files" section of the How the Runtime Locates Assemblies topic.